jdiehl / async-network

Cocoa and iOS Socket Networking Evolved
http://jdiehl.github.com/async-network
MIT License
91 stars 31 forks source link

hi pls can help me to set port and host #23

Closed fredhartem closed 7 years ago

fredhartem commented 7 years ago

hi pls can help me to set port and host on client and server pls

jdiehl commented 7 years ago

You can set the port of the server by setting the port property of AsyncServer before calling start.

You cannot set the port of the client as that is determined automatically via Bonjour. It should still work with a server with a custom port.

If you need to connect by IP address and port, use AsyncConnection instead. Use the connectionWithHost:port: method.