Skip to content

IGTL Message Header Corruption #65

@Sunderlandkyl

Description

@Sunderlandkyl

Since adding a timeout to the sockets, I've observed that the message header can sometimes become corrupted when it times out during:

int r = client.Socket->Receive(headerMsg->GetPackPointer(), headerMsg->GetPackSize());

This results in the message being filled with garbage, and when the message buffer is allocated, it will be be allocated using a random (often large!) size.

This means that OpenIGTLink needs to be able to determine from the header contents if a message header is valid, and if it isn't, decide how to recover from the failure (Read all remaining data before resuming communication?).

What are everyone's thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions