how do you get the channel ID when you create the chanel doing this
if your only suosed to use one which one do you use Huh Grin Tongue
On the server side, you receive a Channel ID as the return value from SimTask.openChannel(channelName). You can use this Channel ID to reference the channel in the future (but not across server reboots). On the client side, you simply reference channels by name -- no IDs are known to the client.
You shouldn't ever have to use the raw NIO classes such as SocketChannel. If you need to open an artibrary connection on a remote server, use the Raw Socket Manager via SimTask (i.e. SimTask.openSocket, sendRawSocketData, closeSocket, etc.)
SimTask and NIOConnection ment to work together
You shouldn't have to worry about NIOConnection. SimTask is your server-side view of the world.
+ how do you set the port to lisen at
In your deployment descriptor (deploy.xml for most of the examples) one of the parameter names is "port". Also, if you are using the canned FakeDiscovery.xml, specify the port here as well.
PPS how do you register a user or get User ID
There should be a server-side class signed up as the SimUserListener for the application. When a user connects, the UserID is passed to the SimUserListener.userJoined call back. In most of the examples there is a "Boot" class that handles user logins/logouts. The Chat Test is an excellent example of most of the common idioms for user connection.
Hope that helps.