View Full Version : Max Script and new Threads

03 March 2012, 02:30 PM

I have code from google for connecting max and socket serwer. This code can send message "hello world". I have question, how I can create function to receive strings from server. Problem is new Thread. When I try listen serwer, max has waiting, and I cant working.

I need try run my code in new Thread, I need help.

hejHo = dotNetObject "System.Net.Sockets.Socket" ( dotnetclass "System.Net.Sockets.AddressFamily" ).InterNetwork ( dotnetclass "System.Net.Sockets.SocketType" ).Stream ( dotnetclass "System.Net.Sockets.ProtocolType" ).Tcp hejHo.Connect "" 8001 ascii_decoder = dotNetObject "System.Text.ASCIIEncoding" bytes = dotNetObject "System.Byte[]" 4096 result = hejHo.Receive bytes return_text = ascii_decoder.GetString(bytes)

My target is: my app sends and receive <------> socket serwer C# <------> max script
I need send commands to max script and run any script (.ms) from disk.

Sorry for my english.

CGTalk Moderation
03 March 2012, 02:30 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.