SocketDevice
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



SocketDevice Expand / Collapse
Author
Message
Posted 11/14/2007 5:55:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/20/2007 6:21:39 AM
Posts: 2, Visits: 8
can you please give me an example (script) for network communication via socket devices?

I successfully connected to a server but I can't send a string to the server by:

strData = "TEST"
MySocket.WriteString (strData)
Hello,


It seems that E-Prime sends continuously requests (without a command=strData) to my TCP-Server even without a WriteString - Command.

I guess that:

strData = "TEST"
MySocket.WriteString (strData)

should transfer the "TEST" string to the TCP server and afterwards the server sends the answer back to the client.
Now I can retrieve the information from the server by calling:

CountChar = MySocket.ReadString(ReceiveString)
Debug.Print "RECEIVED: " &ReceiveString

Is this proceeding correct?

Thanks in advance,

Johann Kim
Post #860
Posted 11/19/2007 9:22:39 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Today @ 8:53:29 AM
Posts: 577, Visits: 1,255
What you have setup is exactly how the socket device should be working especially if you can receive successfully.  Things to try would be as follows...

1) Try calling SocketDevice.FlushInputBuffer and SocketDevice.FlushOutputBuffer prior to making your calls (where SocketDevice is the name of your socket device)

2) Try removing the ( ) parens from the WriteCalls.  In E-Basic, methods that do not return values like the Write calls do not need the parens and in some cases will pass references instead of values.

-Brandon

Post #888
Posted 11/20/2007 6:22:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/20/2007 6:21:39 AM
Posts: 2, Visits: 8
Thank you very much for your answer, we will try it out,

best, Johann
Post #899
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:01pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.109. 16 queries. Compression Disabled.