implement socket handling of message transfer