Jump to content

TCP UDF, Event driven!


Kip
 Share

Recommended Posts

Hi

Fantastic :P

Why not autoit have smth like TCPCreateCallback(Socket, mode, Function) (e.g. TCPCreateCallback($hSocket,$TCP_RECEIVE,"_TCPRecvEvent") or TCPCreateCallback($hSocket,$TCP_SOCKETCLOSE,"_GoodBye"))?

Maybe this would be a feature request :P

THanks for your amazing script Kip :)

Your Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Link to comment
Share on other sites

I'm already busy a much better version of this udf. It supports OnConnectionLost (That's new for autoit :) ), OnSendError, OnReceiveError, and more.

And the new one is really event driven, not like now, that every 50ms is checked if somthing is recieved.

So it also supports this:

Why not autoit have smth like TCPCreateCallback(Socket, mode, Function) (e.g. TCPCreateCallback($hSocket,$TCP_RECEIVE,"_TCPRecvEvent") or TCPCreateCallback($hSocket,$TCP_SOCKETCLOSE,"_GoodBye"))?

Edited by Kip
Link to comment
Share on other sites

I love it :) I cant believe no one has ever done this before (or have I missed it?!)

I hope you don't mind me changing a few things on the event bit.

TCP.au3Server.au3Client.au3

Nice job Alek :P

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Link to comment
Share on other sites

Here is something that i think is a must for any multi-client tcp server :P

edit: A small chat made in 5 minutes :P with this udf:X

P.S.: you need the broadcast udf :)

This is what i get when i try to run your client code.

ERROR: _TcpEvent_Client_Create(): undefined function.
ERROR: _TcpEvent_Client_Send(): undefined function.
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

This is what i get when i try to run your client code.

ERROR: _TcpEvent_Client_Create(): undefined function.
ERROR: _TcpEvent_Client_Send(): undefined function.
it used an older version than the one made by alek :)

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Link to comment
Share on other sites

I'm already busy a much better version of this udf. It supports OnConnectionLost (That's new for autoit :) ), OnSendError, OnReceiveError, and more.

And the new one is really event driven, not like now, that every 50ms is checked if somthing is recieved.

So it also supports this:

Looking forward to the new UDF then :P When you think you will be finishing it??

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...