开发者

send to port on server

If I ope开发者_如何转开发n up a port on our server to listen out for incoming messages (ie - strings of text), how can i send those messages? are their any example codes out there that are useful?

I have downloaded a few sample projects but none seem to do i want.

what code is used to specify the ip address and port number?


Here you wil find exactly what you need.

It is a wrapper class called AsyncSocket; to connect you just send it the string with the ip and an int with the port.

It will do all the work on ints own.

To send info you just turn your string into NSData if I remember correctly.

It has a very easy to follow sample so you should be up and running in about 20 min.


Look up any tutorial text on networking. For instance, there are a bunch of echo server implmentations at rosettacode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜