From b0b99d87b3da1534c3484bb103d4a089e2e02530 Mon Sep 17 00:00:00 2001 From: xieguigang Date: Sat, 11 Dec 2021 22:46:29 +0800 Subject: [PATCH] fix of namespace reference errors --- .../TaskBuilders/BaseRpcBind.vb | 83 ++++++++-------- .../TaskBuilders/BaseTaskBuilder.vb | 4 +- .../TaskBuilders/PortMapper.vb | 89 ++++++++--------- .../TaskBuilders/RpcBindV4.vb | 73 +++++++------- Rpc/BindingProtocols/call_args.vb | 66 ++++++------- Rpc/BindingProtocols/call_result.vb | 77 ++++++++------- Rpc/BindingProtocols/mapping.vb | 70 ++++++------- Rpc/BindingProtocols/netbuf.vb | 76 +++++++-------- Rpc/BindingProtocols/rpcb.vb | 66 ++++++------- Rpc/BindingProtocols/rpcb_entry.vb | 72 +++++++------- Rpc/BindingProtocols/rpcb_rmtcallargs.vb | 66 ++++++------- Rpc/BindingProtocols/rpcb_rmtcallres.vb | 76 +++++++-------- Rpc/BindingProtocols/rpcb_stat.vb | 2 +- Rpc/BindingProtocols/rpcb_stat_byvers.vb | 66 ++++++------- Rpc/BindingProtocols/rpcbs_addr.vb | 66 ++++++------- Rpc/BindingProtocols/rpcbs_rmtcall.vb | 66 ++++++------- Rpc/Connectors/ITicket.vb | 81 ++++++++-------- Rpc/Connectors/TcpClientWrapper.vb | 88 ++++++++--------- Rpc/Connectors/TcpSession.vb | 97 ++++++++++--------- Rpc/Connectors/Ticket.vb | 83 ++++++++-------- Rpc/Connectors/UdpClientWrapper.vb | 80 +++++++-------- Rpc/Connectors/UdpSession.vb | 96 +++++++++--------- Rpc/IRpcClient.vb | 4 +- Rpc/MessageProtocol/accepted_reply.vb | 76 +++++++-------- Rpc/MessageProtocol/body.vb | 66 ++++++------- Rpc/MessageProtocol/call_body.vb | 66 ++++++------- Rpc/MessageProtocol/mismatch_info.vb | 76 +++++++-------- Rpc/MessageProtocol/opaque_auth.vb | 67 +++++++------ Rpc/MessageProtocol/rejected_reply.vb | 66 ++++++------- Rpc/MessageProtocol/reply_body.vb | 66 ++++++------- Rpc/MessageProtocol/rpc_msg.vb | 76 +++++++-------- Rpc/RpcClient.vb | 90 ++++++++--------- Rpc/TcpStreaming/TcpReader.vb | 90 +++++++++-------- Rpc/TcpStreaming/TcpWriter.vb | 92 +++++++++--------- Rpc/Toolkit.vb | 90 ++++++++--------- Rpc/UdpDatagrams/UdpReader.vb | 90 +++++++++-------- Rpc/UdpDatagrams/UdpWriter.vb | 84 ++++++++-------- 37 files changed, 1330 insertions(+), 1312 deletions(-) diff --git a/Rpc/BindingProtocols/TaskBuilders/BaseRpcBind.vb b/Rpc/BindingProtocols/TaskBuilders/BaseRpcBind.vb index b9cb27d..4b12d29 100644 --- a/Rpc/BindingProtocols/TaskBuilders/BaseRpcBind.vb +++ b/Rpc/BindingProtocols/TaskBuilders/BaseRpcBind.vb @@ -1,48 +1,49 @@ #Region "Microsoft.VisualBasic::f1b3521b15d77b06df943a11d2d828cc, Rpc\BindingProtocols\TaskBuilders\BaseRpcBind.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class BaseRpcBind - ' - ' Constructor: (+1 Overloads) Sub New - ' Function: [Set], Dump, GetAddr, GetTime, TAddr2Uaddr - ' UAddr2TAddr, UnSet - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class BaseRpcBind +' +' Constructor: (+1 Overloads) Sub New +' Function: [Set], Dump, GetAddr, GetTime, TAddr2Uaddr +' UAddr2TAddr, UnSet +' +' +' /********************************************************************************/ #End Region Imports System.Collections.Generic +Imports System.IO.XDR Imports System.Threading Imports System.Threading.Tasks @@ -96,7 +97,7 @@ Namespace Rpc.BindingProtocols.TaskBuilders ''' The procedure takes no parameters and returns a list of program, version, network identifier, and universal addresses. ''' Public Function Dump() As Task(Of List(Of rpcb)) - Return CreateTask(Of Xdr.Void, List(Of rpcb))(4UI, New Xdr.Void()) + Return CreateTask(Of Void, List(Of rpcb))(4UI, New Void()) End Function ''' @@ -104,7 +105,7 @@ Namespace Rpc.BindingProtocols.TaskBuilders ''' since the midnight of the First day of January, 1970. ''' Public Function GetTime() As Task(Of UInteger) - Return CreateTask(Of Xdr.Void, UInteger)(6UI, New Xdr.Void()) + Return CreateTask(Of Void, UInteger)(6UI, New Void()) End Function ''' diff --git a/Rpc/BindingProtocols/TaskBuilders/BaseTaskBuilder.vb b/Rpc/BindingProtocols/TaskBuilders/BaseTaskBuilder.vb index 4344967..bc69d63 100644 --- a/Rpc/BindingProtocols/TaskBuilders/BaseTaskBuilder.vb +++ b/Rpc/BindingProtocols/TaskBuilders/BaseTaskBuilder.vb @@ -89,10 +89,10 @@ Namespace Rpc.BindingProtocols.TaskBuilders ''' ''' instance of arguments of request ''' - ''' + ''' ''' type of request ''' - ''' + ''' ''' type of response ''' Protected Function CreateTask(Of TReq, TResp)(proc As UInteger, args As TReq) As Task(Of TResp) diff --git a/Rpc/BindingProtocols/TaskBuilders/PortMapper.vb b/Rpc/BindingProtocols/TaskBuilders/PortMapper.vb index 70dbf7e..0d5cd15 100644 --- a/Rpc/BindingProtocols/TaskBuilders/PortMapper.vb +++ b/Rpc/BindingProtocols/TaskBuilders/PortMapper.vb @@ -1,50 +1,51 @@ #Region "Microsoft.VisualBasic::b9ee3eee7ba86ac3d3dc7da89443fc04, Rpc\BindingProtocols\TaskBuilders\PortMapper.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class PortMapper - ' - ' Properties: Version - ' - ' Constructor: (+1 Overloads) Sub New - ' Function: [Set], CallIt, Dump, GetPort, Null - ' UnSet - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class PortMapper +' +' Properties: Version +' +' Constructor: (+1 Overloads) Sub New +' Function: [Set], CallIt, Dump, GetPort, Null +' UnSet +' +' +' /********************************************************************************/ #End Region Imports System.Collections.Generic +Imports System.IO.XDR Imports System.Threading Imports System.Threading.Tasks Imports Microsoft.VisualBasic.Data.IO @@ -81,8 +82,8 @@ Namespace Rpc.BindingProtocols.TaskBuilders ''' ''' This procedure does no work. By convention, procedure zero of any protocol takes no parameters and returns no results. ''' - Public Function Null() As Task(Of Xdr.Void) - Return CreateTask(Of Xdr.Void, Xdr.Void)(0UI, New Xdr.Void()) + Public Function Null() As Task(Of Void) + Return CreateTask(Of Void, Void)(0UI, New Void()) End Function ''' @@ -118,7 +119,7 @@ Namespace Rpc.BindingProtocols.TaskBuilders ''' The procedure takes no parameters and returns a list of program, version, protocol, and port values. ''' Public Function Dump() As Task(Of List(Of mapping)) - Return CreateTask(Of Xdr.Void, List(Of mapping))(4UI, New Xdr.Void()) + Return CreateTask(Of Void, List(Of mapping))(4UI, New Void()) End Function ''' diff --git a/Rpc/BindingProtocols/TaskBuilders/RpcBindV4.vb b/Rpc/BindingProtocols/TaskBuilders/RpcBindV4.vb index d6688d3..b7b80e3 100644 --- a/Rpc/BindingProtocols/TaskBuilders/RpcBindV4.vb +++ b/Rpc/BindingProtocols/TaskBuilders/RpcBindV4.vb @@ -1,49 +1,50 @@ #Region "Microsoft.VisualBasic::2ab1aea23a36baaa9ad03c3c0ba788ab, Rpc\BindingProtocols\TaskBuilders\RpcBindV4.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class RpcBindV4 - ' - ' Properties: Version - ' - ' Constructor: (+1 Overloads) Sub New - ' Function: BCast, GetAddrList, GetStat, GetVersAddr, Indirect - ' - ' - ' /********************************************************************************/ +' Class RpcBindV4 +' +' Properties: Version +' +' Constructor: (+1 Overloads) Sub New +' Function: BCast, GetAddrList, GetStat, GetVersAddr, Indirect +' +' +' /********************************************************************************/ #End Region Imports System.Collections.Generic +Imports System.IO.XDR Imports System.Threading Imports System.Threading.Tasks @@ -122,7 +123,7 @@ Namespace Rpc.BindingProtocols.TaskBuilders ''' RPCBIND program. ''' Public Function GetStat() As Task(Of rpcb_stat_byvers) - Return CreateTask(Of Xdr.Void, rpcb_stat_byvers)(12UI, New Xdr.Void()) + Return CreateTask(Of Void, rpcb_stat_byvers)(12UI, New Void()) End Function End Class End Namespace diff --git a/Rpc/BindingProtocols/call_args.vb b/Rpc/BindingProtocols/call_args.vb index e00475d..f1dce75 100644 --- a/Rpc/BindingProtocols/call_args.vb +++ b/Rpc/BindingProtocols/call_args.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::8308f7e1795515441aaf357dbae81c2a, Rpc\BindingProtocols\call_args.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class call_args - ' - ' - ' - ' - ' /********************************************************************************/ +' Class call_args +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/call_result.vb b/Rpc/BindingProtocols/call_result.vb index 75419c9..4beb71a 100644 --- a/Rpc/BindingProtocols/call_result.vb +++ b/Rpc/BindingProtocols/call_result.vb @@ -1,47 +1,46 @@ #Region "Microsoft.VisualBasic::03ff050c7d69ea60b7a7204035fd718d, Rpc\BindingProtocols\call_result.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class call_result - ' - ' - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class call_result +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr - +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' ''' Results of callit diff --git a/Rpc/BindingProtocols/mapping.vb b/Rpc/BindingProtocols/mapping.vb index 7e2adf2..c3fce59 100644 --- a/Rpc/BindingProtocols/mapping.vb +++ b/Rpc/BindingProtocols/mapping.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::0c0f35a4b3b9cc9c8acdc27061b76a71, Rpc\BindingProtocols\mapping.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Structure mapping - ' - ' Function: ToString - ' - ' - ' /********************************************************************************/ +' Structure mapping +' +' Function: ToString +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' @@ -70,10 +70,10 @@ Namespace Rpc.BindingProtocols Public port As UInteger ''' - ''' Returns a that represents the current . + ''' Returns a that represents the current . ''' ''' - ''' A that represents the current . + ''' A that represents the current . ''' Public Overrides Function ToString() As String Return String.Format("port:{0} prog:{1} prot:{2} vers:{3}", port, prog, prot, vers) diff --git a/Rpc/BindingProtocols/netbuf.vb b/Rpc/BindingProtocols/netbuf.vb index 80d5385..aca493f 100644 --- a/Rpc/BindingProtocols/netbuf.vb +++ b/Rpc/BindingProtocols/netbuf.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::ffdbfff314cbbd439f5d9605be7da648, Rpc\BindingProtocols\netbuf.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class netbuf - ' - ' - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class netbuf +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcb.vb b/Rpc/BindingProtocols/rpcb.vb index 840ac9b..58e76dd 100644 --- a/Rpc/BindingProtocols/rpcb.vb +++ b/Rpc/BindingProtocols/rpcb.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::6497e581883477f797cd1dcde4296a11, Rpc\BindingProtocols\rpcb.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Structure rpcb - ' - ' - ' - ' - ' /********************************************************************************/ +' Structure rpcb +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcb_entry.vb b/Rpc/BindingProtocols/rpcb_entry.vb index a55afb8..686d35a 100644 --- a/Rpc/BindingProtocols/rpcb_entry.vb +++ b/Rpc/BindingProtocols/rpcb_entry.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::c8445eafe71d16b729cff7dc680113ac, Rpc\BindingProtocols\rpcb_entry.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class rpcb_entry - ' - ' - ' - ' - ' /********************************************************************************/ +' Class rpcb_entry +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' @@ -60,17 +60,17 @@ Namespace Rpc.BindingProtocols Public r_nc_netid As String ''' - ''' semantics of transport (see conctants of ) + ''' semantics of transport (see conctants of ) ''' Public r_nc_semantics As ULong ''' - ''' protocol family (see conctants of ) + ''' protocol family (see conctants of ) ''' Public r_nc_protofmly As String ''' - ''' protocol name (see conctants of ) + ''' protocol name (see conctants of ) ''' Public r_nc_proto As String diff --git a/Rpc/BindingProtocols/rpcb_rmtcallargs.vb b/Rpc/BindingProtocols/rpcb_rmtcallargs.vb index 9ee3d60..c3ead0b 100644 --- a/Rpc/BindingProtocols/rpcb_rmtcallargs.vb +++ b/Rpc/BindingProtocols/rpcb_rmtcallargs.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::4083fbf912c7f2085145f8c3f8e8ab25, Rpc\BindingProtocols\rpcb_rmtcallargs.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class rpcb_rmtcallargs - ' - ' - ' - ' - ' /********************************************************************************/ +' Class rpcb_rmtcallargs +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcb_rmtcallres.vb b/Rpc/BindingProtocols/rpcb_rmtcallres.vb index 7daad8f..ffa9ce9 100644 --- a/Rpc/BindingProtocols/rpcb_rmtcallres.vb +++ b/Rpc/BindingProtocols/rpcb_rmtcallres.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::b278b2261794db401e057ca389168fae, Rpc\BindingProtocols\rpcb_rmtcallres.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class rpcb_rmtcallres - ' - ' - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class rpcb_rmtcallres +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcb_stat.vb b/Rpc/BindingProtocols/rpcb_stat.vb index e1ef159..f3187f7 100644 --- a/Rpc/BindingProtocols/rpcb_stat.vb +++ b/Rpc/BindingProtocols/rpcb_stat.vb @@ -41,7 +41,7 @@ #End Region Imports System.Collections.Generic -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcb_stat_byvers.vb b/Rpc/BindingProtocols/rpcb_stat_byvers.vb index 0eecb39..b80f927 100644 --- a/Rpc/BindingProtocols/rpcb_stat_byvers.vb +++ b/Rpc/BindingProtocols/rpcb_stat_byvers.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::db624fd5fcb3954855677818410712d3, Rpc\BindingProtocols\rpcb_stat_byvers.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class rpcb_stat_byvers - ' - ' - ' - ' - ' /********************************************************************************/ +' Class rpcb_stat_byvers +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcbs_addr.vb b/Rpc/BindingProtocols/rpcbs_addr.vb index 66b1999..f2b87c8 100644 --- a/Rpc/BindingProtocols/rpcbs_addr.vb +++ b/Rpc/BindingProtocols/rpcbs_addr.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::103f104940d83e83099ba35c69655f86, Rpc\BindingProtocols\rpcbs_addr.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class rpcbs_addr - ' - ' - ' - ' - ' /********************************************************************************/ +' Class rpcbs_addr +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/BindingProtocols/rpcbs_rmtcall.vb b/Rpc/BindingProtocols/rpcbs_rmtcall.vb index eb6ce37..3fc4cee 100644 --- a/Rpc/BindingProtocols/rpcbs_rmtcall.vb +++ b/Rpc/BindingProtocols/rpcbs_rmtcall.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::4c0d0aa5a6ac02fc9576e0bb604ba151, Rpc\BindingProtocols\rpcbs_rmtcall.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class rpcbs_rmtcall - ' - ' - ' - ' - ' /********************************************************************************/ +' Class rpcbs_rmtcall +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.BindingProtocols ''' diff --git a/Rpc/Connectors/ITicket.vb b/Rpc/Connectors/ITicket.vb index bb23c70..a13b7eb 100644 --- a/Rpc/Connectors/ITicket.vb +++ b/Rpc/Connectors/ITicket.vb @@ -1,50 +1,51 @@ #Region "Microsoft.VisualBasic::8e8b5228e79a36c05c718af1ac98d87f, Rpc\Connectors\ITicket.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Interface ITicket - ' - ' Properties: Xid - ' - ' Sub: BuildRpcMessage, Except, ReadResult - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Interface ITicket +' +' Properties: Xid +' +' Sub: BuildRpcMessage, Except, ReadResult +' +' +' /********************************************************************************/ #End Region Imports System +Imports System.IO.XDR.Reading +Imports Microsoft.VisualBasic.Data.IO Imports Rpc.MessageProtocol -Imports Xdr Namespace Rpc.Connectors Friend Interface ITicket diff --git a/Rpc/Connectors/TcpClientWrapper.vb b/Rpc/Connectors/TcpClientWrapper.vb index 9845a72..c64a9fd 100644 --- a/Rpc/Connectors/TcpClientWrapper.vb +++ b/Rpc/Connectors/TcpClientWrapper.vb @@ -1,47 +1,47 @@ #Region "Microsoft.VisualBasic::56816b31e3ebe28240fdc458329a2a7c, Rpc\Connectors\TcpClientWrapper.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class TcpClientWrapper - ' - ' Properties: Connected - ' - ' Constructor: (+1 Overloads) Sub New - ' Sub: AsyncConnect, AsyncRead, AsyncWrite, BeginReadRecordMark, Close - ' EndReadBody, EndReadRecordMark, EndWrite, ExtractRecordMark, OnConnected - ' SafeBeginRead, SafeBeginWrite - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class TcpClientWrapper +' +' Properties: Connected +' +' Constructor: (+1 Overloads) Sub New +' Sub: AsyncConnect, AsyncRead, AsyncWrite, BeginReadRecordMark, Close +' EndReadBody, EndReadRecordMark, EndWrite, ExtractRecordMark, OnConnected +' SafeBeginRead, SafeBeginWrite +' +' +' /********************************************************************************/ #End Region @@ -51,12 +51,12 @@ Imports System.IO Imports System.Net Imports System.Net.Sockets Imports System.Threading -Imports NLog +Imports Microsoft.VisualBasic.ApplicationServices.Debugging.Logging Imports Rpc.TcpStreaming Namespace Rpc.Connectors Friend Class TcpClientWrapper - Private Shared Log As Logger = LogManager.GetCurrentClassLogger() + Private Shared Log As LogFile = Microsoft.VisualBasic.My.FrameworkInternal.getLogger(GetType(TcpClientWrapper).FullName) Private ReadOnly _ep As IPEndPoint Private _connected As Boolean = False Private _sync As Object = New Object() diff --git a/Rpc/Connectors/TcpSession.vb b/Rpc/Connectors/TcpSession.vb index 782ab14..4cc4a3c 100644 --- a/Rpc/Connectors/TcpSession.vb +++ b/Rpc/Connectors/TcpSession.vb @@ -1,65 +1,66 @@ #Region "Microsoft.VisualBasic::9375bac9bafcd3331749001949b27a3d, Rpc\Connectors\TcpSession.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class TcpSession - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: EnqueueTicket - ' - ' Sub: AsyncSend, BeginReceive, BuildMessage, Close, OnBlocksWrited - ' OnConnected, OnException, OnMessageReaded, OnSend, RemoveTicket - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class TcpSession +' +' Constructor: (+1 Overloads) Sub New +' +' Function: EnqueueTicket +' +' Sub: AsyncSend, BeginReceive, BuildMessage, Close, OnBlocksWrited +' OnConnected, OnException, OnMessageReaded, OnSend, RemoveTicket +' +' +' /********************************************************************************/ #End Region Imports System Imports System.Collections.Generic -Imports System.Net +Imports System.IO.XDR.Reading Imports System.Linq +Imports System.Net Imports System.Threading -Imports NLog +Imports Microsoft.VisualBasic +Imports Microsoft.VisualBasic.ApplicationServices.Debugging.Logging Imports Rpc.MessageProtocol Imports Rpc.TcpStreaming -Imports Xdr Namespace Rpc.Connectors Friend Class TcpSession Implements IRpcSession - Private Shared Log As Logger = LogManager.GetCurrentClassLogger() + Private Shared Log As LogFile = Microsoft.VisualBasic.My.FrameworkInternal.getLogger(GetType(TcpSession).FullName) Private ReadOnly _client As TcpClientWrapper Private ReadOnly _maxBlock As Integer Private _connected As Boolean = False @@ -155,7 +156,7 @@ Namespace Rpc.Connectors r = CreateReader(tcpReader) respMsg = r.Read(Of rpc_msg)() Catch ex As Exception - Log.Info("Parse exception: {0}", ex) + Log.info($"Parse exception: {ex.ToString}") BeginReceive() Return End Try @@ -173,7 +174,7 @@ Namespace Rpc.Connectors Private Function EnqueueTicket(xid As UInteger) As ITicket SyncLock _sync - Dim result As ITicket + Dim result As ITicket = Nothing If Not _handlers.TryGetValue(xid, result) Then Return Nothing _handlers.Remove(xid) Return result diff --git a/Rpc/Connectors/Ticket.vb b/Rpc/Connectors/Ticket.vb index fbd3838..54e8c77 100644 --- a/Rpc/Connectors/Ticket.vb +++ b/Rpc/Connectors/Ticket.vb @@ -1,53 +1,54 @@ #Region "Microsoft.VisualBasic::20a4f53dbbf2bdf65ad3d3dfccf0297b, Rpc\Connectors\Ticket.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class Ticket - ' - ' Properties: Task, Xid - ' - ' Constructor: (+1 Overloads) Sub New - ' Sub: BuildRpcMessage, Cancel, Except, ReadResult - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class Ticket +' +' Properties: Task, Xid +' +' Constructor: (+1 Overloads) Sub New +' Sub: BuildRpcMessage, Cancel, Except, ReadResult +' +' +' /********************************************************************************/ #End Region Imports System +Imports System.IO.XDR.Reading Imports System.Threading Imports System.Threading.Tasks +Imports Microsoft.VisualBasic.Data.IO Imports Rpc.MessageProtocol -Imports Xdr Namespace Rpc.Connectors Friend Class Ticket(Of TReq, TResp) diff --git a/Rpc/Connectors/UdpClientWrapper.vb b/Rpc/Connectors/UdpClientWrapper.vb index 3c7d9b2..cef4a2e 100644 --- a/Rpc/Connectors/UdpClientWrapper.vb +++ b/Rpc/Connectors/UdpClientWrapper.vb @@ -1,43 +1,43 @@ #Region "Microsoft.VisualBasic::0e46a4a5d2e6d4c63440cb8ae8c4dd62, Rpc\Connectors\UdpClientWrapper.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class UdpClientWrapper - ' - ' Constructor: (+1 Overloads) Sub New - ' Sub: AsyncRead, AsyncWrite, Close, EndRead, EndWrite - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class UdpClientWrapper +' +' Constructor: (+1 Overloads) Sub New +' Sub: AsyncRead, AsyncWrite, Close, EndRead, EndWrite +' +' +' /********************************************************************************/ #End Region @@ -45,12 +45,12 @@ Imports System Imports System.Net Imports System.Net.Sockets Imports System.Threading -Imports NLog +Imports Microsoft.VisualBasic.ApplicationServices.Debugging.Logging Imports Rpc.UdpDatagrams Namespace Rpc.Connectors Friend Class UdpClientWrapper - Private Shared Log As Logger = LogManager.GetCurrentClassLogger() + Private Shared Log As LogFile = Microsoft.VisualBasic.My.FrameworkInternal.getLogger(GetType(UdpClientWrapper).FullName) Private ReadOnly _ep As IPEndPoint Private _sync As Object = New Object() Private _disposed As Boolean = False diff --git a/Rpc/Connectors/UdpSession.vb b/Rpc/Connectors/UdpSession.vb index 478a4ae..9cea356 100644 --- a/Rpc/Connectors/UdpSession.vb +++ b/Rpc/Connectors/UdpSession.vb @@ -1,65 +1,65 @@ #Region "Microsoft.VisualBasic::14f21439dc2d2a8324d44249cffbd635, Rpc\Connectors\UdpSession.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class UdpSession - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: EnqueueTicket - ' - ' Sub: AsyncSend, BeginReceive, BuildMessage, Close, OnDatagramWrited - ' OnException, OnMessageReaded, OnSend, RemoveTicket - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class UdpSession +' +' Constructor: (+1 Overloads) Sub New +' +' Function: EnqueueTicket +' +' Sub: AsyncSend, BeginReceive, BuildMessage, Close, OnDatagramWrited +' OnException, OnMessageReaded, OnSend, RemoveTicket +' +' +' /********************************************************************************/ #End Region Imports System Imports System.Collections.Generic -Imports System.Net +Imports System.IO.XDR.Reading Imports System.Linq +Imports System.Net Imports System.Threading -Imports NLog +Imports Microsoft.VisualBasic.ApplicationServices.Debugging.Logging Imports Rpc.MessageProtocol Imports Rpc.UdpDatagrams -Imports Xdr Namespace Rpc.Connectors Friend Class UdpSession Implements IRpcSession - Private Shared Log As Logger = LogManager.GetCurrentClassLogger() + Private Shared Log As LogFile = Microsoft.VisualBasic.My.FrameworkInternal.getLogger(GetType(UdpSession).FullName) Private ReadOnly _client As UdpClientWrapper Private _sendingTicket As ITicket = Nothing Private ReadOnly _sync As Object = New Object() @@ -138,7 +138,7 @@ Namespace Rpc.Connectors r = CreateReader(udpReader) respMsg = r.Read(Of rpc_msg)() Catch ex As Exception - Log.Info("Parse exception: {0}", ex) + Log.info($"Parse exception: {ex.ToString}") BeginReceive() Return End Try @@ -156,7 +156,7 @@ Namespace Rpc.Connectors Private Function EnqueueTicket(xid As UInteger) As ITicket SyncLock _sync - Dim result As ITicket + Dim result As ITicket = Nothing If Not _handlers.TryGetValue(xid, result) Then Return Nothing _handlers.Remove(xid) Return result diff --git a/Rpc/IRpcClient.vb b/Rpc/IRpcClient.vb index af2c012..361351f 100644 --- a/Rpc/IRpcClient.vb +++ b/Rpc/IRpcClient.vb @@ -61,8 +61,8 @@ Namespace Rpc ''' instance of request arguments ''' task creation options ''' cancellation token - ''' type of request - ''' type of response + ''' type of request + ''' type of response Function CreateTask(Of TReq, TResp)(callBody As call_body, reqArgs As TReq, options As TaskCreationOptions, token As CancellationToken) As Task(Of TResp) ''' ''' Close this connection and cancel all queued tasks diff --git a/Rpc/MessageProtocol/accepted_reply.vb b/Rpc/MessageProtocol/accepted_reply.vb index 8f363ca..c12bedd 100644 --- a/Rpc/MessageProtocol/accepted_reply.vb +++ b/Rpc/MessageProtocol/accepted_reply.vb @@ -1,51 +1,51 @@ #Region "Microsoft.VisualBasic::e01a4d61633bd5d6b1e005f89c152c05, Rpc\MessageProtocol\accepted_reply.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class accepted_reply - ' - ' - ' Class reply_data_union - ' - ' - ' - ' - ' - ' - ' /********************************************************************************/ +' Class accepted_reply +' +' +' Class reply_data_union +' +' +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/MessageProtocol/body.vb b/Rpc/MessageProtocol/body.vb index d78f7b7..a4e264e 100644 --- a/Rpc/MessageProtocol/body.vb +++ b/Rpc/MessageProtocol/body.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::bd99e53c687276780aa4fb106404cec7, Rpc\MessageProtocol\body.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class body - ' - ' - ' - ' - ' /********************************************************************************/ +' Class body +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/MessageProtocol/call_body.vb b/Rpc/MessageProtocol/call_body.vb index 0a62fb2..dc1a3d7 100644 --- a/Rpc/MessageProtocol/call_body.vb +++ b/Rpc/MessageProtocol/call_body.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::1fde0edb903700a2434d2a359f6875d1, Rpc\MessageProtocol\call_body.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class call_body - ' - ' - ' - ' - ' /********************************************************************************/ +' Class call_body +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/MessageProtocol/mismatch_info.vb b/Rpc/MessageProtocol/mismatch_info.vb index c9e05ad..fbc9114 100644 --- a/Rpc/MessageProtocol/mismatch_info.vb +++ b/Rpc/MessageProtocol/mismatch_info.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::84d2797e504b3b24da51cc30e29b226a, Rpc\MessageProtocol\mismatch_info.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class mismatch_info - ' - ' - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class mismatch_info +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/MessageProtocol/opaque_auth.vb b/Rpc/MessageProtocol/opaque_auth.vb index f19c751..a2a888a 100644 --- a/Rpc/MessageProtocol/opaque_auth.vb +++ b/Rpc/MessageProtocol/opaque_auth.vb @@ -1,47 +1,46 @@ #Region "Microsoft.VisualBasic::a8778148a4e31d9bbc52dae0df6c0976, Rpc\MessageProtocol\opaque_auth.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Structure opaque_auth - ' - ' - ' - ' - ' /********************************************************************************/ +' Structure opaque_auth +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr - +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' ''' diff --git a/Rpc/MessageProtocol/rejected_reply.vb b/Rpc/MessageProtocol/rejected_reply.vb index 40bc03e..40f406e 100644 --- a/Rpc/MessageProtocol/rejected_reply.vb +++ b/Rpc/MessageProtocol/rejected_reply.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::63a7b7513a469a29ada2ddc97a7ae21d, Rpc\MessageProtocol\rejected_reply.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class rejected_reply - ' - ' - ' - ' - ' /********************************************************************************/ +' Class rejected_reply +' +' +' +' +' /********************************************************************************/ #End Region -Imports Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/MessageProtocol/reply_body.vb b/Rpc/MessageProtocol/reply_body.vb index 91a3599..1f1c64e 100644 --- a/Rpc/MessageProtocol/reply_body.vb +++ b/Rpc/MessageProtocol/reply_body.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::4fbae78d156727bb507c8f4bd3319cb3, Rpc\MessageProtocol\reply_body.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . - ' /********************************************************************************/ +' /********************************************************************************/ - ' Summaries: +' Summaries: - ' Class reply_body - ' - ' - ' - ' - ' /********************************************************************************/ +' Class reply_body +' +' +' +' +' /********************************************************************************/ #End Region -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/MessageProtocol/rpc_msg.vb b/Rpc/MessageProtocol/rpc_msg.vb index aeff52e..d41e14e 100644 --- a/Rpc/MessageProtocol/rpc_msg.vb +++ b/Rpc/MessageProtocol/rpc_msg.vb @@ -1,46 +1,46 @@ #Region "Microsoft.VisualBasic::27ce1cd71eca7c0ca19ccfb903b62ae8, Rpc\MessageProtocol\rpc_msg.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class rpc_msg - ' - ' - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class rpc_msg +' +' +' +' +' /********************************************************************************/ #End Region -Imports Xdr +Imports System.IO.XDR.Attributes Namespace Rpc.MessageProtocol ''' diff --git a/Rpc/RpcClient.vb b/Rpc/RpcClient.vb index 37120b9..715eb6d 100644 --- a/Rpc/RpcClient.vb +++ b/Rpc/RpcClient.vb @@ -1,57 +1,57 @@ #Region "Microsoft.VisualBasic::d7312dbb05793bd8941454dd896c4334, Rpc\RpcClient.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class RpcClient - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: CreateTask, FromTcp, FromUdp, NewSession - ' - ' Sub: Close, Dispose, OnSessionExcepted, OnSessionMessageSended, RemoveTicket - ' SendNextQueuedItem - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class RpcClient +' +' Constructor: (+1 Overloads) Sub New +' +' Function: CreateTask, FromTcp, FromUdp, NewSession +' +' Sub: Close, Dispose, OnSessionExcepted, OnSessionMessageSended, RemoveTicket +' SendNextQueuedItem +' +' +' /********************************************************************************/ #End Region Imports System Imports System.Collections.Generic -Imports System.Net Imports System.Linq +Imports System.Net Imports System.Threading Imports System.Threading.Tasks -Imports NLog +Imports Microsoft.VisualBasic.ApplicationServices.Debugging.Logging Imports Rpc.Connectors Imports Rpc.MessageProtocol @@ -62,7 +62,7 @@ Namespace Rpc Public Class RpcClient Implements IDisposable, IRpcClient, ITicketOwner - Private Shared Log As Logger = LogManager.GetCurrentClassLogger() + Private Shared Log As LogFile = Microsoft.VisualBasic.My.FrameworkInternal.getLogger(GetType(RpcClient).FullName) Private ReadOnly _sessionCreater As Func(Of IRpcSession) Private ReadOnly _sync As Object = New Object() Private _session As IRpcSession = Nothing diff --git a/Rpc/TcpStreaming/TcpReader.vb b/Rpc/TcpStreaming/TcpReader.vb index 53b876c..ba379b9 100644 --- a/Rpc/TcpStreaming/TcpReader.vb +++ b/Rpc/TcpStreaming/TcpReader.vb @@ -1,52 +1,52 @@ #Region "Microsoft.VisualBasic::b43a3952755b4a3c1792e6daecb89e40, Rpc\TcpStreaming\TcpReader.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class TcpReader - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: (+2 Overloads) Read, UnexpectedEnd - ' - ' Sub: AppendBlock, CheckEmpty, NextBlock - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class TcpReader +' +' Constructor: (+1 Overloads) Sub New +' +' Function: (+2 Overloads) Read, UnexpectedEnd +' +' Sub: AppendBlock, CheckEmpty, NextBlock +' +' +' /********************************************************************************/ #End Region Imports System Imports System.Collections.Generic -Imports Xdr +Imports Microsoft.VisualBasic.Data.IO Namespace Rpc.TcpStreaming ''' @@ -61,6 +61,12 @@ Namespace Rpc.TcpStreaming Private _currentBlock As Byte() = Nothing Private _currentBlockSize As Long = 0 + Public ReadOnly Property EndOfStream As Boolean Implements IByteReader.EndOfStream + Get + Return _currentBlock Is Nothing + End Get + End Property + ''' ''' parser of RPC message received from TCP protocol ''' diff --git a/Rpc/TcpStreaming/TcpWriter.vb b/Rpc/TcpStreaming/TcpWriter.vb index 0c6a547..2ac699d 100644 --- a/Rpc/TcpStreaming/TcpWriter.vb +++ b/Rpc/TcpStreaming/TcpWriter.vb @@ -1,52 +1,52 @@ #Region "Microsoft.VisualBasic::8700ec6d626b51d311a84dbf67bf7178, Rpc\TcpStreaming\TcpWriter.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class TcpWriter - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: Build - ' - ' Sub: CreateNextBlock, SetLastBlock, SetLenth, (+2 Overloads) Write - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class TcpWriter +' +' Constructor: (+1 Overloads) Sub New +' +' Function: Build +' +' Sub: CreateNextBlock, SetLastBlock, SetLenth, (+2 Overloads) Write +' +' +' /********************************************************************************/ #End Region Imports System Imports System.Collections.Generic -Imports Xdr +Imports Microsoft.VisualBasic.Data.IO Namespace Rpc.TcpStreaming ''' @@ -121,10 +121,10 @@ Namespace Rpc.TcpStreaming Private Sub SetLenth(block As Byte()) Dim len = block.Length - 4 - block(0) = CByte(len >> &H18 And &HfF) - block(1) = CByte(len >> &H10 And &HfF) - block(2) = CByte(len >> 8 And &HfF) - block(3) = CByte(len And &HfF) + block(0) = CByte(len >> &H18 And &HFF) + block(1) = CByte(len >> &H10 And &HFF) + block(2) = CByte(len >> 8 And &HFF) + block(3) = CByte(len And &HFF) End Sub ''' diff --git a/Rpc/Toolkit.vb b/Rpc/Toolkit.vb index ecf7fe6..6adad1b 100644 --- a/Rpc/Toolkit.vb +++ b/Rpc/Toolkit.vb @@ -1,54 +1,56 @@ #Region "Microsoft.VisualBasic::d9fc60e97f8ac77fdc9bf9e8bdec53c4, Rpc\Toolkit.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Module Toolkit - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: CreateReader, CreateWriter, DumpToLog, ToDisplay - ' - ' Sub: ReplyMessageValidate - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Module Toolkit +' +' Constructor: (+1 Overloads) Sub New +' +' Function: CreateReader, CreateWriter, DumpToLog, ToDisplay +' +' Sub: ReplyMessageValidate +' +' +' /********************************************************************************/ #End Region Imports System +Imports System.IO.XDR.Reading +Imports System.IO.XDR.Writing +Imports System.Runtime.CompilerServices Imports System.Text +Imports Microsoft.VisualBasic.Data.IO Imports Rpc.MessageProtocol -Imports Xdr -Imports System.Runtime.CompilerServices Namespace Rpc ''' @@ -120,7 +122,7 @@ Namespace Rpc ''' returns the description of the RPC message ''' ''' - ''' + ''' Public Sub ReplyMessageValidate(msg As rpc_msg) Try If msg.body.mtype <> msg_type.REPLY Then Throw UnexpectedMessageType(msg.body.mtype) diff --git a/Rpc/UdpDatagrams/UdpReader.vb b/Rpc/UdpDatagrams/UdpReader.vb index 1fae3d2..c0d2c71 100644 --- a/Rpc/UdpDatagrams/UdpReader.vb +++ b/Rpc/UdpDatagrams/UdpReader.vb @@ -1,51 +1,51 @@ #Region "Microsoft.VisualBasic::fefc384bbb2422b477c4270de9234f57, Rpc\UdpDatagrams\UdpReader.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class UdpReader - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: (+2 Overloads) Read, UnexpectedEnd - ' - ' Sub: CheckEmpty - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class UdpReader +' +' Constructor: (+1 Overloads) Sub New +' +' Function: (+2 Overloads) Read, UnexpectedEnd +' +' Sub: CheckEmpty +' +' +' /********************************************************************************/ #End Region Imports System -Imports Microsoft.VisualBasic.Data.IO.Xdr +Imports Microsoft.VisualBasic.Data.IO Namespace Rpc.UdpDatagrams ''' @@ -59,6 +59,12 @@ Namespace Rpc.UdpDatagrams Private _leftToRead As Integer Private _bytes As Byte() = Nothing + Public ReadOnly Property EndOfStream As Boolean Implements IByteReader.EndOfStream + Get + Return _leftToRead < 1 + End Get + End Property + ''' ''' parser of RPC message received from UDP protocol ''' diff --git a/Rpc/UdpDatagrams/UdpWriter.vb b/Rpc/UdpDatagrams/UdpWriter.vb index cac8caa..6c366d8 100644 --- a/Rpc/UdpDatagrams/UdpWriter.vb +++ b/Rpc/UdpDatagrams/UdpWriter.vb @@ -1,52 +1,52 @@ #Region "Microsoft.VisualBasic::97b31e1a2228390af824b8d7ec289a55, Rpc\UdpDatagrams\UdpWriter.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class UdpWriter - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: Build, SizeIsExceeded - ' - ' Sub: CreateNextBlock, (+2 Overloads) Write - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class UdpWriter +' +' Constructor: (+1 Overloads) Sub New +' +' Function: Build, SizeIsExceeded +' +' Sub: CreateNextBlock, (+2 Overloads) Write +' +' +' /********************************************************************************/ #End Region Imports System Imports System.Collections.Generic -Imports Xdr +Imports Microsoft.VisualBasic.Data.IO Namespace Rpc.UdpDatagrams '''