Jump to content
Sign in to follow this  

winsock udp

Recommended Posts


When using this script below the _TCP_DataArrival gets triggered every time but the GetData($data) never returns the data that is being recv'ed

as a server i used

nc -lup 5500 (linux)
and i wrote the data by hand ^_^

any ideea why this is happening?

btw: not sure if it is related but i got the same behavior with the adodb.execute : $obj.execute("query text" , byref $rowsaffected) and $rowsaffected was never changed... (is it possible it's a bug?)

Global $_Socket = ObjCreate("MSWINSOCK.WINSOCK")
Global $data
While TimerDiff($timer)<10000
;   $_Socket.GetData($data)
;   If $data<>"" Then MsgBox(0 , "" , $data)
Func _TCP_DataArrival($bytes)
    Local $data,$host
    MsgBox(0 , $host , "|"&$data&"|",1)
Func _TCP_Error($Number,$Descr,$Scode,$Source,$Helpfile,$HelpContext,$CancelDisplay)
    MsgBox(0 , "" , StringFormat("%s\n%s\n%s\n%s\n%s\n%s\n%s\n",$Number,$Descr,$Scode,$Source,$Helpfile,$HelpContext,$CancelDisplay))
Edited by TheMadman

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this