In reply to smarconi:
What do you mean by ports? Some code might be helpful in understanding the problem.