Flash初哥

February 1, 2010

[C]Socket Programming with UDP

Filed under: C/C++ — Tags: , , — KAV @ 7:27 am

UDP Socket Programming – Using C language

* UDP server : simple UDP server that prints received messages.
source : udpServer.c
usage : ./udpServer
* UDP client : simple UDP client that sends data to server.
source : udpClient.c
usage : ./udpClient server data1 … dataN

To compile :

* linux : gcc -Wall -o foo foo.c
* solaris : gcc -Wall -o foo foo.c -lsocket -lnsl
(more…)

[C++]UDP programming : Operation not supported

Filed under: C/C++ — Tags: , , , — KAV @ 5:06 am

You can’t “Listen” on UDP sockets, only TCP, since UDP is a connectionless protocol – it’s a message-passing protocol. If you drop the “Listen” parameter to the new(), you’ll find that you’ll be able to create the socket. You’ll then want to call $sock->recv() (with the appropriate arguments), which will block until you receive a message…

November 28, 2009

Flash Socket通信的安全策略问题

Filed under: Flash技術文章,網上收隼 — Tags: , , , — KAV @ 11:07 am

from : http://wangleifire.javaeye.com/blog/315138

昨天做测试的时候遇到一个问题,做好的SWF在Flash AS3中调试通过,但是发布到http://i.cs.hku.hk/~hmtse/blog/wp-admin/post-new.phphtml中之后就无法得到数据了。查了一些资料之后找到了解决办法。这里感谢 剑心 提供帮助,以及同事若水三千提供Java代码及日志记录。
(more…)

Powered by WordPress