I have a server application that talks to four coms ports (or more).
The application uses a class (one for each Comms port with methods etc) that deals with receiving data from and sending to those coms ports.
Now when the class has the data it needs to send it to the Client (Clients) to display the data.
I need to send who the data is from, a message header and the body of the message.
Who its from. I have in the past just allocated an "id" but I would like to actually send the handle (is that the correct term) of the class.
The code above is an idea.Code:<serializable ()> public Class OpMsg public Whois As Object public MessagerHeader as String public MessageBody as String 'or byte array etc End Class
Message header. The is generally just text string.
Message body. It can be a string or array of bytes (Its length can vary).
Now do I create a serializable class and put these data types in or can someone suggest another way.
Im not looking code, just a concept.




Reply With Quote