- This topic has 2 replies, 2 voices, and was last updated 10 years, 2 months ago by Anonymous.
-
AuthorPosts
-
September 23, 2014 at 03:34 #3330AnonymousInactive
I’ve confirmed the sample.
C # sample is difficult for me.Can you provide a more simple sample?
I vb.net user.How do I transfer to a remote location to my CLASS object?
Please provide me a sample
I simply my CLASS with the data sent to the remote and
I would like to restore the valueSeptember 23, 2014 at 05:41 #3331AnonymousInactiveThere is a VB.net sample included in the download package, have you seen this?
Regards,
MarcSeptember 24, 2014 at 17:59 #3336AnonymousInactiveI check the sample.
It sent a string that receives the console
NetworkComms.SendObject("Message", CType(targetServerConnectionInfo.RemoteEndPoint, IPEndPoint).Address.ToString(), CType(targetServerConnectionInfo.RemoteEndPoint, IPEndPoint).Port, stringToSend)
I want to get my class to send a simple object.
Using VB.netI created a simple source
But it does not work.
(An error occurred)here my code
my class..
<ProtoContract> _ Public Class ProtobufCustomObject <ProtoMember(1)> _ Public Property IntValue() As Integer Get Return m_IntValue End Get Private Set(value As Integer) m_IntValue = value End Set End Property Private m_IntValue As Integer <ProtoMember(2)> _ Public Property StringValue() As String Get Return m_StringValue End Get Private Set(value As String) m_StringValue = value End Set End Property Private m_StringValue As String ''' <summary> ''' Private constructor required for protobuf ''' </summary> Private Sub New() End Sub ''' <summary> ''' Constructor object for ProtobufCustomObject ''' </summary> ''' <param name="intValue"></param> ''' <param name="stringValue"></param> Public Sub New(intValue As Integer, stringValue As String) Me.IntValue = intValue Me.StringValue = stringValue End Sub End Class
Sending. Side.
Form LOAD
`
NetworkComms.AppendGlobalIncomingPacketHandler(Of Byte())(“ArrayByte”, AddressOf PrintIncomingMessage)
NetworkComms.AppendGlobalIncomingPacketHandler(Of String())(“ArrayString”, AddressOf PrintIncomingMessage2)
NetworkComms.AppendGlobalIncomingPacketHandler(Of ProtobufCustomObject)(“CustomObject”, AddressOf 수신객체)‘ Connection.StartListening(ConnectionType.TCP, New IPEndPoint(IPAddress.Any, 2020), False)
Connection.StartListening(컨넥션타입, New IPEndPoint(IPAddress.Any, 0))
Dim localListeningEndPoints As List(Of EndPoint) = Connection.ExistingLocalListenEndPoints(컨넥션타입)
For Each localEndPoint As IPEndPoint In localListeningEndPointsDebug.WriteLine(“서버2 {0}:{1}”, localEndPoint.Address, localEndPoint.Port)
Next`Send Command button
Dim lastServerIPEndPoint As IPEndPoint = Nothing lastServerIPEndPoint = IPTools.ParseEndPointFromString(Me.TextBox1.Text) Dim appl As ApplicationLayerProtocolStatus = ApplicationLayerProtocolStatus.Enabled Dim ConnectionInfo As ConnectionInfo = New ConnectionInfo(lastServerIPEndPoint, appl) Dim connectionToUse As Connection = TCPConnection.GetConnection(ConnectionInfo) Dim kkk As ProtobufCustomObject = New ProtobufCustomObject(1111, "2222") connectionToUse.SendObject("CustomObject", kkk)
err messge…from ExplicitSerializer class..
처리되지 않은 ‘System.ArgumentException’ 형식의 예외가 NetworkCommsDotNet.dll에서 발생했습니다.
추가 정보: objectToSerialize must implement IExplicitlySerializeso…
Please provide me a simple VB.net samplesIt is a simple string, my custom class objects, including a number
It is the server and the client of the window-based
Samples for transmitting and receiving. -
AuthorPosts
- You must be logged in to reply to this topic.