dudenyc Posted June 19, 2008 Posted June 19, 2008 (edited) Hello,The TCP protocol has been killing me for that past couple of days. I tried to figure out how to send a keystroke from a client to a server using TCP. For example, I want to send the keystroke "{ENTER}" to the server with this syntax:"TCPSend($ConnectedSocket, "{ENTER}")oÝ÷ Ø¥²kçmè^Æö¥¹êÔÄFG²jÊ®¢Ýªê-jëh×6TCPSend($ConnectedSocket, "0D")What I get on the sever is the text {ENTER} or 0D instead of the keystroke of ENTER key.Please suggest me how to solve this problem . Any input is highly appreciated . Edited June 19, 2008 by dudenyc
monoceres Posted June 19, 2008 Posted June 19, 2008 Hi! Study this two codes: ; Server TCPStartup() $listen=TcpListen(@IPAddress1,1337) Do sleep(250) $connectedsocket=TCPAccept($listen) Until $connectedsocket<>-1 Do Sleep(100) $data=TCPRecv($connectedsocket,1024) If $data<>"" Then Send($data) Until False ; Client TCPStartup() $connectedsocket=TCPConnect(@IPAddress1,1337) sleep(2000) TcpSend($connectedsocket,"{ENTER}") Broken link? PM me and I'll send you the file!
dudenyc Posted June 20, 2008 Author Posted June 20, 2008 Nice monoceres, trick of the trade . Thank you for your help .
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now