Sign in to follow this  
Followers 0
VicTT

UDP Functions

33 posts in this topic

Hasn't anyone tested those UDP functions?I can't seem to get them to work..And the examples are "waiting" forum input..:)..

Lols..I could correct all the mistakes in the manual should anyone be interested..By the way..it's AWAITING..not WAITING..Lols..and to think I'm not a native speaker..really..anyone interested in a lot of typo corrections?I just hate to see such a great manual gone to waste by stupid typos..Oh yea..people..help me out..WHY THE HELL DON'T THOSE FUNCTIONS WORK???10x..bye


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites



This topic belongs in the DISORGANIZED RANT forum... oh wait, we don't have one of those here. I wonder why that is?

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

That's coz this DISORGANISED RANT brings up a matter which either is on the DISORGANISED RANT forum or just plain wasn't brought up till now..

So, as I was disorganisedly saying:

1. WHO DO I TALK TO IN ORDER TO CORRECT THE TYPOS IN THE MANUAL

and

2. Everyone give a round of applause..It's the UDP function birthday..it's been 1 month since the manual wasn't updated with the examples needed by the average joe..Why is that?Wait..I forgot..this isn't the "CRITICISE THE DEMI-GODS" forum..I wonder why that is?

I have the utmost respect for what you people do daily to keep AutoIt "alive"..and you're doing a 'mostly' good job..I'm simply pointing out that this aspect has been (knowingly or unknowingly) left out..Simply saying..DO SOMETHING ABOUT IT!

Organised enough?Hope so..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

Hasn't anyone tested those UDP functions?I can't seem to get them to work..And the examples are "waiting" forum input..:)..

This is your chance to make the manual even better! :evil:

Take a look at the TCP examples and adapt them to the UDP functions. The function calls a quite similar.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Well..I've tried to use them a few times..but they don't seem to work..It could be because I have no second box I can use to put a server on..But most likely they should work with localhost, no?:)..

I'll give it a shot..if no one here has done this till now, it spells "trouble" to me..:evil:..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

I'll give it a shot..if no one here has done this till now, it spells "trouble" to me..:)..

UDPBind returns with an error on my system. @error = 10093 (WSANOTINITIALISED). I guess the guy how developed the UDP functions should have a look.

$g_IP = "127.0.0.1"

; Create a Listening "SOCKET"
;==============================================
$ConnectedSocket = UDPBind($g_IP, 65432)
If $ConnectedSocket = -1 Then 
   msgbox(0,"UDP Error", "Error: " & @error)
   Exit
endif

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

UDPBind returns with an error on my system. @error = 10093 (WSANOTINITIALISED). I guess the guy how developed the UDP functions should have a look.

$g_IP = "127.0.0.1"

; Create a Listening "SOCKET"
;==============================================
$ConnectedSocket = UDPBind($g_IP, 65432)
If $ConnectedSocket = -1 Then 
   msgbox(0,"UDP Error", "Error: " & @error)
   Exit
endif

Cheers

Kurt

<{POST_SNAPBACK}>

I need help to diagnose if there is a problem in UDP.

I ask now a long time ago that's UDP lover test it, so please anybody do it and report back

Thanks

Share this post


Link to post
Share on other sites

I need help to diagnose if there is a problem in UDP.

I ask now a long time ago that's UDP lover test it, so please anybody do it and report back

Thanks

<{POST_SNAPBACK}>

so what's the reason for the error I got: @error = 10093 (WSANOTINITIALISED) ??

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

I was about to test, however, I get a little solid brick wall when trying to create a simple UDP server

$uServer = UDPBind("192.168.0.3", 65530)
MsgBox(0, "test", $uServer & @CRLF & @AutoItVersion)
If $uServer = -1 Then Exit

running 3.1.1.50, I'll post a duplicate in the Bug forum


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I need help to diagnose if there is a problem in UDP.

I ask now a long time ago that's UDP lover test it, so please anybody do it and report back

the error I received ("@error = 10093 (WSANOTINITIALISED") indicates, that the function WSAStartup was not be called in advance of calling bind().

From MSDN: Winsock Functions

"The WSAStartup function must be the first Windows Sockets function called by an application or DLL. It allows an application or DLL to specify the version of Windows Sockets required and retrieve details of the specific Windows Sockets implementation. The application or DLL can only issue further Windows Sockets functions after successfully calling WSAStartup"

See also error codes of function bind() and sample code on the same page. MSDN Winsock Functions - bind(). Sample is for TCP. For UDP use SOCK_DGRAM and IPPROTO_UDP in function socket().

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

the error I received ("@error = 10093 (WSANOTINITIALISED") indicates, that the function WSAStartup was not be called in advance of calling bind().

From MSDN: Winsock Functions

"The WSAStartup function must be the first Windows Sockets function called by an application or DLL. It allows an application or DLL to specify the version of Windows Sockets required and retrieve details of the specific Windows Sockets implementation. The application or DLL can only issue further Windows Sockets functions after successfully calling WSAStartup"

See also error codes of function bind() and sample code on the same page. MSDN Winsock Functions - bind()

Cheers

Kurt

<{POST_SNAPBACK}>

so use TCPStartup it is not a logical name but it is doing exactly that. :) Edited by jpm

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

so use TCPStartup it is not a logical name but it is doing exactly that. :D

<{POST_SNAPBACK}>

Yup, TCPStartup() works for the UDP server. netstat -na returns: UDP 127.0.0.1:65530 *.* :)

So, could we have a UDPStartup() as well ? Or just WinsockInit() :evil:

Now, I used the scripts of "MSLx Fanboy" from this post UDP functions, but I get an error when UDPSend() is called. The error is: @error = 10038 - WSAENOTSOCK.

From MSDN Winsock Error codes:

Socket operation on nonsocket.

An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Yup, TCPStartup() works for the UDP server. netstat -na returns: UDP    127.0.0.1:65530 *.*  :)

HOWEVER, even though the server now opens a socket, I'm not able to send data to it. Using netcat I'm sending random characters to port 65530, but UDPRecv() returns just an empty string....

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

UDPSend gets an error and returns @error = 10038. I'm looking that up now though

WSAENOTSOCK

Error Number: 10038

Socket operation on non-socket.

An operation was attempted on something that is not a socket.

Either the socket handle parameter did not reference a valid

socket, or for select, a member of an fd_set was not valid.

Source

Edited by MSLx Fanboy

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

UDPSend gets an error and returns @error = 10038.  I'm looking that up now though

Source

<{POST_SNAPBACK}>

yes, see my post: #13 in this thread.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

:"> I missed that post, sorry. Maybe NetStart()?


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Maybe NetStart()?

<{POST_SNAPBACK}>

Hm.. I tend to UDPStartup() although it is redundant with TCPStartup(), otherwise people forget to use that function, because it's in another section of the help file.

BTW: I'm working on the problem with jpm. There are some issues in the source code of the UDP functions, which lead to the described errors.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

I say that TCPStartup() remain built in, as it might break scripts if the name were changed. Maybe just having a UDPStartup() 'echo' or run the same code as TCPStartup, or just have the UDP help file say that TCPStartup is required or something...


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

Just a *bump* for /dev/null and anyone else who wants to take a peek.

I updated the code thanks to a little smack in the back of the head from Larry...I forgot TCPShutdown... :) Thanks though, I'm a stickler for closing everything I open, I can't believe I did that :evil:

Here are the current scripts that I have...If there's something wrong, let me know please!

Edit: Current scripts (as of 6/24/05 5:47pm est) are in post # 23

Edited by MSLx Fanboy

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

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  
Followers 0