Sign in to follow this  
Followers 0
Basicz

little question about TCP function's

5 posts in this topic

#1 ·  Posted (edited)

Hi !

I'm already travelling in many forum's and in help file's (which is good to start) but can't not find a solution for me.

It's about TCPAccept() function and TCPListen, in the help file from TCPAccept() it says :

Permits an incoming connection attempt on a socket.

The main socket identifier (SocketID) as returned by a TCPListen function.

i understand that it's able to get a Socket ID by TCPListen() function (or TCPConnect() function).

My question is the TCPAccept(), is it able to use an already USED Socket ID from some client ?

And is TCPListen() to search opened Socket ID that be in use or to be open a new Socket ID?

from the help file TCPlisten() :

(Creates a socket listening for an incoming connection.)

huh? really don't understand that... *sorry* can someone explain me that, how it's real working ?

so these TCP function's used for TCPSend() later

have searched but didn't found an answer of my question...

but have found example about sending some stuff from Manadar, ::

This sends an hex packet:

$Hex = "AA 00 13 7E 1B 43 4F 4E 4E 45 43 54 45 44 20 53 45 52 56 45 52 0A "
$Str = StringSplit($Hex," ")
$Hex = ''
For $x = 1 to $Str[0]
    If $Str[$x] Then
        $Hex &= Chr((Dec($Str[$x])))
    EndIf
Next
MsgBox(0, "", "Click OK to start, make sure you have a packet scanner ready!")
$ReturnTCPStartup = TCPStartup()
$IP = TCPNameToIP("www.google.com")
$Socket = TCPConnect($IP,80)
TCPSend($Socket,$Hex)
MsgBox(0, "", "IP: " & $IP & @CRLF & "TCPStartup return: " & $ReturnTCPStartup & @CRLF & "Connected: "  & $Socket & @CRLF & "Message: " & $Hex)
it's working but if i change it with an another Socket ID (from my running client with some sniffer's) it won't work.. try many things but can't get it to work.. :) Edited by Basicz

[right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center]

Share this post


Link to post
Share on other sites



Hi !

I'm already travelling in many forum's and in help file's (which is good to start) but can't not find a solution for me.

It's about TCPAccept() function and TCPListen, in the help file from TCPAccept() it says :

Permits an incoming connection attempt on a socket.

The main socket identifier (SocketID) as returned by a TCPListen function.

i understand that it's able to get a Socket ID by TCPListen() function (or TCPConnect() function).

My question is the TCPAccept(), is it able to use an already USED Socket ID from some client ?

And is TCPListen() to search opened Socket ID that be in use or to be open a new Socket ID?

from the help file TCPlisten() :

(Creates a socket listening for an incoming connection.)

huh? really don't understand that... *sorry* can someone explain me that, how it's real working ?

so these TCP function's used for TCPSend() later

have searched but didn't found an answer of my question...

but have found example about sending some stuff from Manadar, ::

it's working but if i change it with an another Socket ID (from my running client with some sniffer's) it won't work.. try many things but can't get it to work.. :)

I'm not so hot on TCP functions so I don't know whether or not you can use them with a socket created in another process, but I would guess not.

TCPListen is like creating a phone with no bell, and TCPAccept is like picking up the receiver to see if anyone is there.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

TCPListen is like creating a phone with no bell, and TCPAccept is like picking up the receiver to see if anyone is there.

That's clearly thank you much ^^

next waiting for a confirm about the socket id that be able to use in TCPSend() from a client process.


[right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center]

Share this post


Link to post
Share on other sites

Can someone help me ? About the socket ID. :)


[right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center]

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