-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple_server.mws
executable file
·16 lines (16 loc) · 1.06 KB
/
simple_server.mws
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{VERSION 6 0 "IBM INTEL NT" "6.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }}
{SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "restart:\nwith(Socke
ts):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 267 "server:=proc(sid)
\n local getMsg,sendMsg:\n\n getMsg:=Read(sid):\n\n printf(\"%s:\\n
Received Message: %s\\n from: %s\\n port:%d\",GetHostName(),getMsg,Get
PeerHost(sid),GetPeerPort(sid));\n\n sendMsg:=cat(\"Hello \",GetPeerH
ost(sid)):\n Write(sid,sendMsg):\n \n Close(sid):\nend:" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "Serve(2525,server);" }}{PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "2 1 0" 0 }
{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }