diff options
author | chatty | 1993-11-29 09:45:49 +0000 |
---|---|---|
committer | chatty | 1993-11-29 09:45:49 +0000 |
commit | c7096e6189ee7cec99ac3bb625c045f68c4f4b8c (patch) | |
tree | 075300808bcb5ae3d5821789d523871e7d6126d6 /comm/OLD | |
parent | 7973cb306ade5199072e68f3a8486ac0547c45a1 (diff) | |
download | ivy-league-c7096e6189ee7cec99ac3bb625c045f68c4f4b8c.zip ivy-league-c7096e6189ee7cec99ac3bb625c045f68c4f4b8c.tar.gz ivy-league-c7096e6189ee7cec99ac3bb625c045f68c4f4b8c.tar.bz2 ivy-league-c7096e6189ee7cec99ac3bb625c045f68c4f4b8c.tar.xz |
Made communications synchronous
Now use HandleNew
Diffstat (limited to 'comm/OLD')
-rw-r--r-- | comm/OLD/Agent.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/comm/OLD/Agent.cc b/comm/OLD/Agent.cc index 6c06f01..ec4c28d 100644 --- a/comm/OLD/Agent.cc +++ b/comm/OLD/Agent.cc @@ -158,7 +158,7 @@ UchAgent :: HandleRead () SysError (ErrWarn, "UchAgent::HandleRead: Accept"); return; } - UchRemoteAgent* ra = new UchRemoteAgent (this, ch); + UchRemoteAgent* ra = HandleNew (ch); delete ch; ra->SetMode (IOReadSelect); @@ -170,9 +170,10 @@ UchAgent :: HandleRead () /*? This virtual function is called whenever a new agent connects to this one. ?*/ -void -UchAgent :: HandleNew (UchRemoteAgent*) +UchRemoteAgent* +UchAgent :: HandleNew (UchChannel* ch) { + return new UchRemoteAgent (this, ch); } /*? @@ -359,9 +360,12 @@ UchRemoteAgent :: UchRemoteAgent (UchAgent* a, UchChannel* ch) } UchRemoteAgent :: UchRemoteAgent (UchAgent* a, UchAddress* addr) -: UchMsgStream (addr, 0), +: UchMsgStream (0, addr), MyLocalAgent (a) { + if (!Setup ()) + SysError (ErrWarn, "Connect"); + SetSyncMode (TRUE); } |