- Socket = IP-Adress + Portnumber
- Bidirektionaler ASCII-Datenstrom
- /etc/services - Konfigurationsdatei
- 0-1023: Well Known Ports (only root)
- 1024-49151: User Registered Ports
- 49152-65535: Temporary Ports
- netstat - Kommando
- IA-Seminar : Client / Server
#!/usr/bin/tclsh
proc serverrequest { socketid } {
gets $socketid request
puts $socketid "Antwort: $request"
}
proc serverhandle { socketid ipaddr portno } {
puts "Socket-ID: $socketid / IP-Adresse Client: $ipaddr / Portnummer Client: $portno"
fileevent $socketid readable "serverrequest $socketid"
fconfigure $socketid -buffering line
}
socket -server serverhandle 9010
vwait wartebisinalleewigkeit