Socket(Stream) errors and how to cope with them

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Socket(Stream) errors and how to cope with them

timrowledge
Sockets are tricky little buggers. At any time something can cause the smooth flow of carefully tailored packets; wiring faults, power surges, nuclear holocaust, invasion of body snatchers, the usual stuff.

I’ve been trying to work out what problems can occur, how they get noticed by our code, how they get signalled (if they do) and ultimately what to do about it. Obviously this is in the context of my MQTTClient package but after my peering around the system I get a strong impression we could do with some in-code documentation of such things along with a page or ten of good swiki doc.

So:  who knows the secrets of the magic box we know as Sockets? What is likely to happen if the wire gets cut by an incoming intruder in the midst of a packet being transported?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Oxymorons: Government organization



Reply | Threaded
Open this post in threaded view
|

Re: Socket(Stream) errors and how to cope with them

David T. Lewis
On Thu, Mar 23, 2017 at 07:15:07PM -0700, tim Rowledge wrote:

> Sockets are tricky little buggers. At any time something can cause the smooth flow of carefully tailored packets; wiring faults, power surges, nuclear holocaust, invasion of body snatchers, the usual stuff.
>
> I???ve been trying to work out what problems can occur, how they get noticed by our code, how they get signalled (if they do) and ultimately what to do about it. Obviously this is in the context of my MQTTClient package but after my peering around the system I get a strong impression we could do with some in-code documentation of such things along with a page or ten of good swiki doc.
>
> So:  who knows the secrets of the magic box we know as Sockets? What is likely to happen if the wire gets cut by an incoming intruder in the midst of a packet being transported?
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Oxymorons: Government organization
>

I have no magical insight, but I am the author of a Java package that handles
socket based communications for production critical applications at an automotive
manufacturer, so I have some practical experience in this area. The code that I
wrote to handle exception conditions was written more about 10 years ago, and I
currently spend exactly zero time worrying about handling exceptions.

I would not mind helping out with MQTTClient if I can be of assistance.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Socket(Stream) errors and how to cope with them

David T. Lewis
In reply to this post by timrowledge
On Thu, Mar 23, 2017 at 07:15:07PM -0700, tim Rowledge wrote:

> Sockets are tricky little buggers. At any time something can cause the smooth flow of carefully tailored packets; wiring faults, power surges, nuclear holocaust, invasion of body snatchers, the usual stuff.
>
> I???ve been trying to work out what problems can occur, how they get noticed by our code, how they get signalled (if they do) and ultimately what to do about it. Obviously this is in the context of my MQTTClient package but after my peering around the system I get a strong impression we could do with some in-code documentation of such things along with a page or ten of good swiki doc.
>
> So:  who knows the secrets of the magic box we know as Sockets? What is likely to happen if the wire gets cut by an incoming intruder in the midst of a packet being transported?
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Oxymorons: Government organization
>

I have no magical insight, but I am the author of a Java package that handles
socket based communications for production critical applications at an automotive
manufacturer, so I have some practical experience in this area. The code that I
wrote to handle exception conditions was written more about 10 years ago, and I
currently spend exactly zero time worrying about handling exceptions.

I would not mind helping out with MQTTClient if I can be of assistance.

Dave