To connect to another server through winsock,Is it necessary to define port? If not how If yes then in windows 2000

net send <host name> 'message'

how it works?