also i forgot to mention for you to check that the portmap is not set to null,if it is you will only be able to connect to the port but not read or write from it.