public TransmitRes Transmit(IDSI dsiReq) { ServerDS sv; try { sv = NewServerDS(dsiReq); } catch (ExitShotException err) { throw new TransmitFailureException(err); } try { try { lock (Sock) { Sock.Send(dsiReq.ToArray(sv.RId)); } } catch (SocketException err) { throw new TransmitFailureException(err); } sv.evRecv.WaitOne(); if (sv.err != null) { throw new TransmitFailureException(sv.err); } return(new TransmitRes(sv.dsiRes)); } finally { DisconnectServerDS(sv); } }
public void Send(IDSI dsiReq) { ServerDS sv; try { sv = NewServerDS(dsiReq); } catch (ExitShotException err) { throw new TransmitFailureException(err); } try { try { lock (Sock) { Sock.Send(dsiReq.ToArray(sv.RId)); } } catch (SocketException err) { throw new TransmitFailureException(err); } return; } finally { DisconnectServerDS(sv); } }
public TransmitRes Transmit(IDSI dsiReq) { ServerDS sv; try { sv = NewServerDS(dsiReq); } catch (ExitShotException err) { throw new TransmitFailureException(err); } try { try { lock (Sock) { Sock.Send(dsiReq.ToArray(sv.RId)); } } catch (SocketException err) { throw new TransmitFailureException(err); } sv.evRecv.WaitOne(); if (sv.err != null) throw new TransmitFailureException(sv.err); return new TransmitRes(sv.dsiRes); } finally { DisconnectServerDS(sv); } }