Python Socket Server and C# Unity Client -


we're trying connect python server socket not blocking tcp. tried other clients , works charm.

server = mytcpserver((ip_localhost, port), mytcpserverhandler) server.socket.setblocking(0) 

in other side, have c# unity client ( tried lot of async implementations )

        ipaddress ipaddress = ipaddress.parse("127.0.0.1");         ipendpoint remoteep = new ipendpoint(ipaddress, port);         // create tcp/ip socket.         socket client = new socket(addressfamily.internetwork,                                    sockettype.stream, protocoltype.tcp);          client.connect(new ipendpoint(ipaddress.loopback,port));         client.blocking = false;          socketasynceventargs socketasyncdata = new socketasynceventargs();         string = @"{""json"":""json_data""}";         _recievebuffer = getbytes(a);         socketasyncdata.setbuffer(_recievebuffer,0,_recievebuffer.length);         client.sendasync(socketasyncdata); 

every time c# client tries send data : [errorno 10035] 'the socket operation not complete without blocking')

we've tried :

http://forum.unity3d.com/threads/c-tcp-ip-socket-how-to-receive-from-server.227259/#post-1513674

https://msdn.microsoft.com/en-us/library/bew39x2a.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1

but no result.

anyone knows how implement not blocking socket in c#?

thanks.


Comments

  1. Well Done ! the blog is great and Interactive it is about Python Socket Server and C# Unity Client it is useful for students and Python Developers for more updates on python follow the link

    Python Online course

    For more info on other technologies go with below links

    tableau online training hyderabad

    ServiceNow Online Training

    mulesoft Online Training

    ReplyDelete

Post a Comment

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -