fix of namespace reference errors

master
xieguigang 5 years ago
parent 344b6e058f
commit b0b99d87b3

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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.
''' </summary>
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
''' <summary>
@ -104,7 +105,7 @@ Namespace Rpc.BindingProtocols.TaskBuilders
''' since the midnight of the First day of January, 1970.
''' </summary>
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
''' <summary>

@ -89,10 +89,10 @@ Namespace Rpc.BindingProtocols.TaskBuilders
''' <param name="args">
''' instance of arguments of request
''' </param>
''' <typeparamname="TReq">
''' <typeparam name="TReq">
''' type of request
''' </typeparam>
''' <typeparamname="TResp">
''' <typeparam name="TResp">
''' type of response
''' </typeparam>
Protected Function CreateTask(Of TReq, TResp)(proc As UInteger, args As TReq) As Task(Of TResp)

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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
''' <summary>
''' This procedure does no work. By convention, procedure zero of any protocol takes no parameters and returns no results.
''' </summary>
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
''' <summary>
@ -118,7 +119,7 @@ Namespace Rpc.BindingProtocols.TaskBuilders
''' The procedure takes no parameters and returns a list of program, version, protocol, and port values.
''' </summary>
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
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' 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.
''' </summary>
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

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class call_args
'
'
'
'
' /********************************************************************************/
' Class call_args
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' Summaries:
' Class call_result
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>
''' Results of callit

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' 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
''' <summary>
@ -70,10 +70,10 @@ Namespace Rpc.BindingProtocols
Public port As UInteger
''' <summary>
''' Returns a <seecref="System.String"/> that represents the current <seecref="Rpc.BindingProtocols.mapping"/>.
''' Returns a <see cref="System.String"/> that represents the current <see cref="Rpc.BindingProtocols.mapping"/>.
''' </summary>
''' <returns>
''' A <seecref="System.String"/> that represents the current <seecref="Rpc.BindingProtocols.mapping"/>.
''' A <see cref="System.String"/> that represents the current <see cref="Rpc.BindingProtocols.mapping"/>.
''' </returns>
Public Overrides Function ToString() As String
Return String.Format("port:{0} prog:{1} prot:{2} vers:{3}", port, prog, prot, vers)

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' Summaries:
' Class netbuf
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Structure rpcb
'
'
'
'
' /********************************************************************************/
' Structure rpcb
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class rpcb_entry
'
'
'
'
' /********************************************************************************/
' Class rpcb_entry
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>
@ -60,17 +60,17 @@ Namespace Rpc.BindingProtocols
<Order(1), Var>
Public r_nc_netid As String
''' <summary>
''' semantics of transport (see conctants of <seecref="Rpc.BindingProtocols.TransportSemantics"/>)
''' semantics of transport (see conctants of <see cref="Rpc.BindingProtocols.TransportSemantics"/>)
''' </summary>
<Order(2)>
Public r_nc_semantics As ULong
''' <summary>
''' protocol family (see conctants of <seecref="Rpc.BindingProtocols.ProtocolFamily"/>)
''' protocol family (see conctants of <see cref="Rpc.BindingProtocols.ProtocolFamily"/>)
''' </summary>
<Order(3), Var>
Public r_nc_protofmly As String
''' <summary>
''' protocol name (see conctants of <seecref="Rpc.BindingProtocols.ProtocolName"/>)
''' protocol name (see conctants of <see cref="Rpc.BindingProtocols.ProtocolName"/>)
''' </summary>
<Order(4), Var>
Public r_nc_proto As String

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class rpcb_rmtcallargs
'
'
'
'
' /********************************************************************************/
' Class rpcb_rmtcallargs
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' Summaries:
' Class rpcb_rmtcallres
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -41,7 +41,7 @@
#End Region
Imports System.Collections.Generic
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' 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
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class rpcbs_addr
'
'
'
'
' /********************************************************************************/
' Class rpcbs_addr
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class rpcbs_rmtcall
'
'
'
'
' /********************************************************************************/
' Class rpcbs_rmtcall
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.BindingProtocols
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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()

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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)

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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

@ -61,8 +61,8 @@ Namespace Rpc
''' <param name="reqArgs">instance of request arguments</param>
''' <param name="options">task creation options</param>
''' <param name="token">cancellation token</param>
''' <typeparamname="TReq">type of request</typeparam>
''' <typeparamname="TResp">type of response</typeparam>
''' <typeparam name="TReq">type of request</typeparam>
''' <typeparam name="TResp">type of response</typeparam>
Function CreateTask(Of TReq, TResp)(callBody As call_body, reqArgs As TReq, options As TaskCreationOptions, token As CancellationToken) As Task(Of TResp)
''' <summary>
''' Close this connection and cancel all queued tasks

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' 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
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class body
'
'
'
'
' /********************************************************************************/
' Class body
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class call_body
'
'
'
'
' /********************************************************************************/
' Class call_body
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' Summaries:
' Class mismatch_info
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Structure opaque_auth
'
'
'
'
' /********************************************************************************/
' Structure opaque_auth
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>
'''

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class rejected_reply
'
'
'
'
' /********************************************************************************/
' Class rejected_reply
'
'
'
'
' /********************************************************************************/
#End Region
Imports Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' /********************************************************************************/
' Summaries:
' Summaries:
' Class reply_body
'
'
'
'
' /********************************************************************************/
' Class reply_body
'
'
'
'
' /********************************************************************************/
#End Region
Imports Microsoft.VisualBasic.Data.IO.Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' Summaries:
' Class rpc_msg
'
'
'
'
' /********************************************************************************/
#End Region
Imports Xdr
Imports System.IO.XDR.Attributes
Namespace Rpc.MessageProtocol
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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
''' <summary>
@ -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
''' <summary>
''' parser of RPC message received from TCP protocol
''' </summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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
''' <summary>
@ -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
''' <summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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
''' <summary>
@ -120,7 +122,7 @@ Namespace Rpc
''' returns the description of the RPC message
''' </summary>
''' <param name="msg"></param>
''' <returns></returns>
''' <return></return>
Public Sub ReplyMessageValidate(msg As rpc_msg)
Try
If msg.body.mtype <> msg_type.REPLY Then Throw UnexpectedMessageType(msg.body.mtype)

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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
''' <summary>
@ -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
''' <summary>
''' parser of RPC message received from UDP protocol
''' </summary>

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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
''' <summary>

Loading…
Cancel
Save