Auio42TheWin Posted July 28, 2015 Posted July 28, 2015 So, for personal reasons, I want to communicate between my Virtual Machine and the Host pc.Client : TCPStartup ()$TCPConnect = TCPConnect ("127.0.0.1", 8080)If $TCPConnect = -1 Then ExitTCPSend($TCPConnect, "Hi server how are you")While 1 $TCPRec = TCPRecv ($TCPConnect, 1000000) If $TCPRec <> "" Then MsgBox (0, "Server sended me response", $TCPRec,9) WEndServer : #include <ButtonConstants.au3>#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>#Region ### START Koda GUI section ### Form=$Form1 = GUICreate("Server", 524, 101, 207, 133)$Input1 = GUICtrlCreateInput("Input1", 8, 8, 505, 21)$Button1 = GUICtrlCreateButton("Send", 8, 40, 505, 57)GUISetState(@SW_SHOW)TCPStartup()$TCPListen = TCPListen ("127.0.0.1", 8080, 100)While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1Do $TCPAccept = TCPAccept($TCPListen)Until $TCPAccept <> -1TCPSend ($TCPAccept, "Hi client") EndSwitchWend But it doesn't work, I used Hamachi and it still didn't work.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now