Jump to content

Search the Community

Showing results for tags '10060'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Hello, I have a problem, I downloaded example of TCP Server and Client, but client doesn't work, It shows TCPConnect 10060 error (timeout), I tried to turn on two servers, I think server work, because one server show 10048 error(Address already in use) I don't know why it doesn't work, I edited that script, but it doesn't work still. I tried TCPConnect and TCPAccept from AutoIt3\Examples\Helpfile, but TCPConnect shows error 10060(timeout)... Anybody knows how to fix it? Thanks ; SERVER #include <Array.au3> TCPStartup() Dim $Socket_Data[1] $Socket_Data[0] = 0 $Listen = TCPListen(@IPAddress1, 1018, 500) If @error Then ConsoleWrite('!-->['&@Hour&":"&@MIN&":"&@SEC&'] TCPListen error. ( ' & @error & ' )' & @CRLF) Exit EndIf While 1 For $x = $Socket_Data[0] To 1 Step -1 $Recv = TCPRecv($Socket_Data[$x], 1000000) If $Recv Then MsgBox(0, 'Client Number ' & $x & ' with connected socket identifier ' & $Socket_Data[$x], "["&@Hour&":"&@MIN&":"&@SEC&"]"&' Recived msg from Client: ' & @CRLF & $Recv, 5) TCPSend($Socket_Data[$x], 'bye') TCPCloseSocket($Socket_Data[$x]) _ArrayDelete($Socket_Data, $x) $Socket_Data[0] -= 1 EndIf Next _Accept() WEnd Func _Accept() Local $Accept = TCPAccept($Listen) If $Accept <> -1 Then _ArrayAdd($Socket_Data, $Accept) $Socket_Data[0] += 1 EndIf EndFunc ;==>_Accept exit; CLIENT $Connected = False TCPStartup() ; Start TCP. $timespentconnecting = TimerInit( ) Do $Socket = TCPConnect(@IPAddress1, 1018) ; Connect to server. $nERROR = @error ; TCPConnect @error. If not $nERROR Then ; If client connected to server. $Connected = True Else ; If TCPConnect didn't connected to server. ConsoleWrite( "["&@Hour&":"&@MIN&":"&@SEC&"] TCPConnect error. {CODE:" & $nERROR & "}"&@CRLF ) ; Show error. EndIf sleep(100) ; Sleep 0.1 secounds. Until $Connected = True or TimerDiff( $timespentconnecting ) > 10000 ; If client connected or timer > 10 secounds, stop trying connect to server. If $Connected = False then exit ; If client didn't connected to server, exit. TCPSend($Socket, 'Hi there. My computer name is' & ", " & @ComputerName & ", and its drive serial is " & DriveGetSerial(@HomeDrive)); Send to server data. Do ; Loop until client recives data from server. $Recv = TCPRecv($Socket, 1000000) ; Recive data from server. Until $Recv ; Stop looping when data recived from server. MsgBox(0, "["&@Hour&":"&@MIN&":"&@SEC&"] Recived from server:", $Recv); Show recived data from server. Exit(0) ; Exit.
×
×
  • Create New...