If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

TCP UPD Example server and client Message

Ja, well okay um i have been looking at the TCP/UPD example in Thinbasic samples.

In the code there is a function that is used to send a data packet declared as sMessage

Client Side

gData.InfoData.iBroadcast.sMessage = "Something"

This is what the client sends to the server.

I am struggling, with getting the IF statement working, what i want to do is that on the server side if a message for example "Somthing" gets received it should respond by creating a MsgBox 0, "success!"

Re: TCP UPD Example server and client Message

Hi Laatwaai and welcome to thinBasic community forum.

What exactly is not working?
Do you get a runtime error message?
Or are you haveing un-expected results?

There are two kind of IF ... statements: single line or multiple line
Single line it means all the IF statement must be on a single line
Multiple lines means the IF statement must finish with a END IF
Your example seems breaking single line rule.

Anyway, any more info would be precious to try to understand the problem.

Re: TCP UPD Example server and client Message

Attention to firewalls also for local communications
Under Windows 7 you have to authorize your scripts to access network and/or open some ports both as client or as server.
Under Windows XP if firewall is on you have to authorize your application (thinBasic.exe) to access some ports.