Jump to content
Sign in to follow this  
Kip

TCP UDF, Event driven!

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

 

Share this post


Link to post
Share on other sites

When will this UDF be included in AutoIt?


Valik, The Legendary programmer!Will be using that signature for 2 months due to my loss on a bet ):

Share this post


Link to post
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

Share this post


Link to post
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

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
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

Share this post


Link to post
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]

Share this post


Link to post
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

Share this post


Link to post
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??

Share this post


Link to post
Share on other sites

Very nice !!! :)

I was looking forward to the _OnConnectionLost Function or can i achieve something like that with the funcs allready implemented?

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...