Code archives/Networking/Server Operating System
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
| Hello, this is a Tool for Server Programmer. Oh.. you can change the Port Number for Connect to the Server. (yes... I'm can't good Speak english. *g*) cu ShadowTurtle | |||||
AppTitle "Server Operating System"
Graphics 800, 600, 16, 2
Global PortNum = 110
Print "Server Operating System"
.resetconnect:
Print "Press enter for exit!"
Serv$ = Input$("Connect to (Port " + Str$(PortNum) + ") ?")
If Serv$ = "" Then
Print "Programm exit. Press a key!"
WaitKey()
End
Else
Print "Connect to " + Serv$ + " (Port " + Str$(PortNum) + ") ..."
TheServer = OpenTCPStream(Serv$, PortNum)
If Not TheServer Then
Print "Connection failed! Press a key... (Key U = Config Port!)"
WaitKey()
If KeyDown(22) Then
NewPort = Input("Enter new Port number: ")
If NewPort = 0 Then
Print "Programm exit. Press a key!"
WaitKey()
End
Else
PortNum = NewPort
Goto resetconnect
End If
Else
End
End If
End If
End If
Print "Connected! Press 'end' and the Programm say: Bye, Bye! *g*"
While Not Lower$(A$) = "end"
i$ = ReadLine(TheServer)
Print Serv$ + " " + i$
A$ = Input$(Serv$ + ">")
WriteLine TheServer, A$
Wend
CloseTCPStream(TheServer)
Print "Programm exit. Press a key! (Bye, Bye)"
WaitKey()
End |
Comments
None.
Code Archives Forum