BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
365 stars 108 forks source link

TcpClient in Message Class #9

Closed nastymorbol closed 7 years ago

nastymorbol commented 7 years ago

Hi,

i need access to the TcpClient in the DataReceived event. Is ist possible to add a public member to the Message Class?

BrandonPotter commented 7 years ago

Hmm, probably - What is the scenario you have?

nastymorbol commented 7 years ago

Hi,

I have to close the Client socket After Receive of a new Message. I Could make a Stack but it is more readable when i make this in the Event.

Ive Forked your Project, Tested it and it Works like a sharm.

Best thanks! And sorry for my Bad english ...

Von meinem iPhone gesendet

Am 08.01.2017 um 18:06 schrieb Brandon Potter notifications@github.com:

Hmm, probably - What is the scenario you have?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

WopsVSV commented 7 years ago

I've got the same problem, really need to access the TcpClient in the DataReceived event. Can't figure out a way to do it.

BrandonPotter commented 7 years ago

The new package for this should be out now which includes the TcpClient as a property on the Message object. Let me know if that works!

WopsVSV commented 7 years ago

Works like a charm. Thank you!