tcp

package
v0.0.0-...-7c8058c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

*

  • MIT License *
  • Copyright (c) 2017 - 2019 CNES *
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all
  • copies or substantial portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  • SOFTWARE.

*

  • MIT License *
  • Copyright (c) 2017 - 2019 CNES *
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all
  • copies or substantial portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  • SOFTWARE.

*

  • MIT License *
  • Copyright (c) 2017 - 2018 CNES *
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all
  • copies or substantial portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  • SOFTWARE.

*

  • MIT License *
  • Copyright (c) 2017 CNES *
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all
  • copies or substantial portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  • SOFTWARE.

*

  • MIT License *
  • Copyright (c) 2019 CNES *
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all
  • copies or substantial portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  • SOFTWARE.

*

  • MIT License *
  • Copyright (c) 2017 - 2019 CNES *
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all
  • copies or substantial portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  • SOFTWARE.

Index

Constants

View Source
const (
	MALTCP     string = "maltcp"
	MALTCP_URI string = "maltcp://"
)
View Source
const (
	MAL_SDUTYPE_SEND byte = iota
	MAL_SDUTYPE_SUBMIT
	MAL_SDUTYPE_SUBMIT_ACK
	MAL_SDUTYPE_REQUEST
	MAL_SDUTYPE_REQUEST_RESPONSE
	MAL_SDUTYPE_INVOKE
	MAL_SDUTYPE_INVOKE_ACK
	MAL_SDUTYPE_INVOKE_RESPONSE
	MAL_SDUTYPE_PROGRESS
	MAL_SDUTYPE_PROGRESS_ACK
	MAL_SDUTYPE_PROGRESS_UPDATE
	MAL_SDUTYPE_PROGRESS_RESPONSE
	MAL_SDUTYPE_PUBSUB_REGISTER
	MAL_SDUTYPE_PUBSUB_REGISTER_ACK
	MAL_SDUTYPE_PUBSUB_PUBLISH_REGISTER
	MAL_SDUTYPE_PUBSUB_PUBLISH_REGISTER_ACK
	MAL_SDUTYPE_PUBSUB_PUBLISH
	MAL_SDUTYPE_PUBSUB_NOTIFY
	MAL_SDUTYPE_PUBSUB_DEREGISTER
	MAL_SDUTYPE_PUBSUB_DEREGISTER_ACK
	MAL_SDUTYPE_PUBSUB_PUBLISH_DEREGISTER
	MAL_SDUTYPE_PUBSUB_PUBLISH_DEREGISTER_ACK
)
View Source
const (
	// Name of preoperty allowing to fix the underlying protocol: currently tcp, tcp4 or tcp6.
	// By default use tcp.
	NETWORK_PROPERTY string = "network"

	VARIABLE_LENGTH_OFFSET uint32 = 19
	FIXED_HEADER_LENGTH    uint32 = 23
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPBody

type TCPBody struct {
	// contains filtered or unexported fields
}

func NewTCPBody

func NewTCPBody(buf []byte, writeable bool) *TCPBody

func (*TCPBody) DecodeLastParameter

func (body *TCPBody) DecodeLastParameter(element Element, abstract bool) (Element, error)

func (*TCPBody) DecodeParameter

func (body *TCPBody) DecodeParameter(element Element) (Element, error)

func (*TCPBody) EncodeLastParameter

func (body *TCPBody) EncodeLastParameter(element Element, abstract bool) error

func (*TCPBody) EncodeParameter

func (body *TCPBody) EncodeParameter(element Element) error

func (*TCPBody) Reset

func (body *TCPBody) Reset(writeable bool)

func (*TCPBody) SetEncodingFactory

func (body *TCPBody) SetEncodingFactory(factory EncodingFactory)

type TCPTransport

type TCPTransport struct {
	// contains filtered or unexported fields
}

func (*TCPTransport) Close

func (transport *TCPTransport) Close() error

func (*TCPTransport) NewBody

func (transport *TCPTransport) NewBody() Body

Returns a new Body ready to encode

func (*TCPTransport) NewMessage

func (transport *TCPTransport) NewMessage() *Message

Returns a new Message ready to encode

func (*TCPTransport) Transmit

func (transport *TCPTransport) Transmit(msg *Message) error

func (*TCPTransport) TransmitMultiple

func (transport *TCPTransport) TransmitMultiple(msgs ...*Message) error

type TCPTransportFactory

type TCPTransportFactory struct {
}

func (*TCPTransportFactory) NewTransport

func (*TCPTransportFactory) NewTransport(u *url.URL, ctx TransportCallback) (Transport, *URI, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL