text: var docData = {"packages":[{"isSingleFile":false,"description":"## Package Overview\n\nThis package provides an implementation for sending/receiving messages to/from another application process (local or remote) for both connection-oriented protocols.\n\n#### Client\n\nThe `tcp:Client` is used to connect to a socket server and interact with it.\nThe client can simply send the data to the server and retrieve the data from the server.\n\nA Client can be defined by providing the `remoteHost` and the `remotePort`. \nA simple Client code as follows.\n\n```ballerina\ntcp:Client socketClient \u003d check new (\"localhost\", 3000);\n\nstring msg \u003d \"Hello Ballerina\";\nbyte[] msgByteArray \u003d msg.toBytes();\ncheck  socketClient-\u003ewriteBytes(msgByteArray);\n\nreadonly \u0026 byte[] receivedData \u003d check socketClient-\u003ereadBytes();\n\ncheck socketClient-\u003eclose();\n```\n\n#### Listener\nThe `tcp:Listener` is used to listen to the incoming socket request. The `onConnect(tcp:Caller)` remote method gets invoked when a new client is connected. The new client is represented using the `tcp:Caller`. The `onConnect(tcp:Caller)` method may return `tcp:ConnectionService|tcp:Error`.\n\nThe `tcp:ConnectionService` can have following remote methods\u003c/br\u003e\n`onBytes(readonly \u0026 byte[] data)` - This remote method is invoked once the content is received from the client.\u003c/br\u003e\n`onError(readonly \u0026 tcp:Error err)` - This remote method is invoked in an error situation.\u003c/br\u003e\n`onClose()` - This remote method is invoked when the connection is closed.\u003c/br\u003e\n\nA `tcp:Listener` can be defined as follows:\n```ballerina\nservice on new tcp:Listener(3000) {\n    remote function onConnect(tcp:Caller caller) returns tcp:ConnectionService {\n        io:println(\"Client connected to echoServer: \", caller.remotePort);\n        return new EchoService(caller);\n    }\n}\n\nservice class EchoService {\n    tcp:Caller caller;\n\n    public function init(tcp:Caller c) {self.caller \u003d c;}\n\n    remote function onBytes(readonly \u0026 byte[] data) returns tcp:Error? {\n        // echo back the data to the client\n        return data;\n    }\n\n    remote function onError(readonly \u0026 tcp:Error err) returns tcp:Error? {\n        log:printError(\"An error occurred\", err \u003d err);\n    }\n\n    remote function onClose() returns tcp:Error? {\n         io:println(\"Client left: \", self.caller.remotePort);\n    }\n}\n```\n\nFor information on the operations, which you can perform with this package, see the below **Functions**. For examples on the usage of the operations, see the following.\n * [Basic TCP Client Example](https://ballerina.io/learn/by-example/tcp-client.html)\n * [Basic TCP Listener Example](https://ballerina.io/learn/by-example/tcp-listener.html)","modules":[{"id":"tcp","summary":"","description":"","orgName":"ballerina","version":"0.8.0-alpha4","records":[{"fields":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"path","description":"Certificate file location\n","isDeprecated":false}],"isClosed":true,"name":"Certificate","description":"Certificate configuration.\n\n","isDeprecated":false},{"fields":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"localHost","description":"Local binding of the interface.\n","isDeprecated":false},{"defaultValue":"300000","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"timeoutInMillis","description":"The socket reading timeout value to be used \n                    in milliseconds. If this is not set,the default value\n                    of 300000 milliseconds (5 minutes) will be used.\n","isDeprecated":false},{"defaultValue":"","type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"SecureSocket","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"secureSocket","description":"secureSocket configuratoin.\n","isDeprecated":false}],"isClosed":true,"name":"ClientConfig","description":"Configurations for the connection oriented tcp client.\n\n","isDeprecated":false},{"fields":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"localHost","description":"","isDeprecated":false},{"defaultValue":"","type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"ListenerSecureSocket","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"secureSocket","description":"","isDeprecated":false}],"isClosed":true,"name":"ListenerConfig","description":"","isDeprecated":false},{"fields":[{"defaultValue":"","type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"SecureSocket","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"name":"certificate","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Certificate","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},{"name":"protocol","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"orgName":"UNK_ORG","moduleName":"UNK_MOD","version":"UNK_VER","name":"ballerina/tcp:0.8.0-alpha4:Protocol?","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},{"name":"ciphers","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"orgName":"UNK_ORG","moduleName":"UNK_MOD","version":"UNK_VER","name":"string[]","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}}],"paramTypes":[],"arrayDimensions":0},"name":"SecureSocket","description":"","isDeprecated":false,"inclusionType":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"SecureSocket","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"name":"certificate","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Certificate","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},{"name":"protocol","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"orgName":"UNK_ORG","moduleName":"UNK_MOD","version":"UNK_VER","name":"ballerina/tcp:0.8.0-alpha4:Protocol?","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},{"name":"ciphers","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"orgName":"UNK_ORG","moduleName":"UNK_MOD","version":"UNK_VER","name":"string[]","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}}],"paramTypes":[],"arrayDimensions":0}},{"defaultValue":"","type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"PrivateKey","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"privateKey","description":"Server private key\n","isDeprecated":false}],"isClosed":true,"name":"ListenerSecureSocket","description":"Secure Socket configuration for TCP Listener.\n\n","isDeprecated":false},{"fields":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"path","description":"private key file location\n","isDeprecated":false}],"isClosed":true,"name":"PrivateKey","description":"Private key configuration.\n\n","isDeprecated":false},{"fields":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"name","description":"Protocol name\n","isDeprecated":false},{"defaultValue":"","type":{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},"name":"versions","description":"Protocol versions\n","isDeprecated":false}],"isClosed":true,"name":"Protocol","description":"Transport security protocol.\n\n","isDeprecated":false},{"fields":[{"defaultValue":"","type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Certificate","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"certificate","description":"Server certificate\n","isDeprecated":false},{"defaultValue":"()","type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Protocol","category":"records","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"protocol","description":"SSL or TLS protocol\n","isDeprecated":false},{"defaultValue":"[]","type":{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},"name":"ciphers","description":"Ciper used\n","isDeprecated":false}],"isClosed":true,"name":"SecureSocket","description":"Secure Socket configuration for TCP Client.\n\n","isDeprecated":false}],"classes":[],"abstractObjects":[{"fields":[],"methods":[],"name":"ConnectionService","description":"Represent TCP Listener ConnectionService service type.\n","isDeprecated":false},{"fields":[],"methods":[],"name":"Service","description":"Represent TCP Listener service type.\n","isDeprecated":false}],"clients":[{"remoteMethods":[{"isIsolated":true,"isRemote":true,"isExtern":false,"parameters":[{"defaultValue":"","type":{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"byte","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},"name":"data","description":"The data need to be sent to the remote host\n","isDeprecated":false}],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"() or else a `tcp:Error` if the given data can\u0027t be sent\n","isDeprecated":false}],"name":"writeBytes","description":"Sends the response as byte[] to the same remote host.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":true,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"() or else a `tcp:Error` if the connection can\u0027t be properly\n           closed\n","isDeprecated":false}],"name":"close","description":"Close the remote connection.\n\n","isDeprecated":false}],"fields":[{"defaultValue":"\"\"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"remoteHost","description":"The hostname or the IP address of the remote host\n","isDeprecated":false},{"defaultValue":"-1","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"remotePort","description":"The port number of the remote host\n","isDeprecated":false},{"defaultValue":"\"\"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"localHost","description":"The hostname which the binded\n","isDeprecated":false},{"defaultValue":"-1","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"localPort","description":"The port number which the socket is binded\n","isDeprecated":false}],"methods":[{"isIsolated":true,"isRemote":true,"isExtern":false,"parameters":[{"defaultValue":"","type":{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"byte","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},"name":"data","description":"The data need to be sent to the remote host\n","isDeprecated":false}],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"() or else a `tcp:Error` if the given data can\u0027t be sent\n","isDeprecated":false}],"name":"writeBytes","description":"Sends the response as byte[] to the same remote host.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":true,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"() or else a `tcp:Error` if the connection can\u0027t be properly\n           closed\n","isDeprecated":false}],"name":"close","description":"Close the remote connection.\n\n","isDeprecated":false}],"otherMethods":[],"isReadOnly":false,"isIsolated":false,"name":"Caller","description":"Represents caller object in tcp service remote methods\n\n","isDeprecated":false},{"remoteMethods":[{"isIsolated":false,"isRemote":true,"isExtern":false,"parameters":[{"defaultValue":"","type":{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"byte","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},"name":"data","description":"The data need to be sent to the connected remote host\n","isDeprecated":false}],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"() or else a `tcp:Error` if the given data can\u0027t be sent\n","isDeprecated":false}],"name":"writeBytes","description":"Sends the given data to the connected remote host.\n```ballerina\n    # tcp:Error? result \u003d socketClient-\u003ewriteBytes(\"msg\".toBytes());\n    # ```\n\n","isDeprecated":false},{"isIsolated":false,"isRemote":true,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"isAnonymousUnionType":true,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":true,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":true,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"name":"readonly","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"byte","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}}],"paramTypes":[],"arrayDimensions":0}},{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}],"paramTypes":[],"arrayDimensions":0},"name":"","description":"The `readonly \u0026 byte[]`, or else a `tcp:Error` if the data\n           can\u0027t be read from the remote host\n","isDeprecated":false}],"name":"readBytes","description":"Reads data only from the connected remote host. \n```ballerina\n    # (readonly \u0026 byte[])|tcp:Error result \u003d socketClient-\u003ereadBytes();\n    # ```\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":true,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"A `tcp:Error` if it can\u0027t close the connection or else `()`\n","isDeprecated":false}],"name":"close","description":"Free up the occupied socket.\n```ballerina\n    # tcp:Error? closeResult \u003d socketClient-\u003eclose();\n    # ```\n\n","isDeprecated":false}],"fields":[],"methods":[{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"remoteHost","description":"The hostname or the IP address of the remote host\n","isDeprecated":false},{"defaultValue":"","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"remotePort","description":"The port number of the remmote host\n","isDeprecated":false}],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"","isDeprecated":false}],"name":"init","description":"Initializes the TCP client based on the \nprovided configurations.\n```ballerina\n    # tcp:Client|tcp:Error? socketClient \u003d new(\"www.remote.com\", 80,\n    #                              localHost \u003d \"localHost\");\n    # ```\n","isDeprecated":false},{"isIsolated":false,"isRemote":true,"isExtern":false,"parameters":[{"defaultValue":"","type":{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"byte","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}},"name":"data","description":"The data need to be sent to the connected remote host\n","isDeprecated":false}],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"() or else a `tcp:Error` if the given data can\u0027t be sent\n","isDeprecated":false}],"name":"writeBytes","description":"Sends the given data to the connected remote host.\n```ballerina\n    # tcp:Error? result \u003d socketClient-\u003ewriteBytes(\"msg\".toBytes());\n    # ```\n\n","isDeprecated":false},{"isIsolated":false,"isRemote":true,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"isAnonymousUnionType":true,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":true,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0,"elementType":{"isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":true,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"name":"readonly","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},{"isAnonymousUnionType":false,"isArrayType":true,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":1,"elementType":{"name":"byte","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}}],"paramTypes":[],"arrayDimensions":0}},{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}],"paramTypes":[],"arrayDimensions":0},"name":"","description":"The `readonly \u0026 byte[]`, or else a `tcp:Error` if the data\n           can\u0027t be read from the remote host\n","isDeprecated":false}],"name":"readBytes","description":"Reads data only from the connected remote host. \n```ballerina\n    # (readonly \u0026 byte[])|tcp:Error result \u003d socketClient-\u003ereadBytes();\n    # ```\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":true,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"A `tcp:Error` if it can\u0027t close the connection or else `()`\n","isDeprecated":false}],"name":"close","description":"Free up the occupied socket.\n```ballerina\n    # tcp:Error? closeResult \u003d socketClient-\u003eclose();\n    # ```\n\n","isDeprecated":false}],"initMethod":{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"string","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"remoteHost","description":"The hostname or the IP address of the remote host\n","isDeprecated":false},{"defaultValue":"","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"remotePort","description":"The port number of the remmote host\n","isDeprecated":false}],"returnParameters":[{"type":{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"Error","category":"types","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"","isDeprecated":false}],"name":"init","description":"Initializes the TCP client based on the \nprovided configurations.\n```ballerina\n    # tcp:Client|tcp:Error? socketClient \u003d new(\"www.remote.com\", 80,\n    #                              localHost \u003d \"localHost\");\n    # ```\n","isDeprecated":false},"otherMethods":[],"isReadOnly":false,"isIsolated":false,"name":"Client","description":"Initializes the TCP connection client based on the \nprovided configurations.\n","isDeprecated":false}],"listeners":[{"lifeCycleMethods":[{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"service object {} ","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"s","description":"Type descriptor of the service\n","isDeprecated":false},{"defaultValue":"()","type":{"name":"() ","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"name","description":"Name of the service\n","isDeprecated":false}],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"`()` or else a `tcp:Error` upon failure to register\n            the listener\n","isDeprecated":false}],"name":"attach","description":"Binds a service to the `tcp:Listener`.\n```ballerina\n    # tcp:error? result \u003d tcpListener.attach(helloService);\n    # ```\n\n","isDeprecated":false}],"fields":[],"methods":[{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"localPort","description":"The port number of the remote service\n","isDeprecated":false}],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"","isDeprecated":false}],"name":"init","description":"Initializes the TCP listener based on the privovided configurations. \n```ballerina\n    #  listener Listener|error? server1 \u003d new (8080);\n    # ```\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"service object {} ","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"s","description":"Type descriptor of the service\n","isDeprecated":false},{"defaultValue":"()","type":{"name":"() ","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"name","description":"Name of the service\n","isDeprecated":false}],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"`()` or else a `tcp:Error` upon failure to register\n            the listener\n","isDeprecated":false}],"name":"attach","description":"Binds a service to the `tcp:Listener`.\n```ballerina\n    # tcp:error? result \u003d tcpListener.attach(helloService);\n    # ```\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"An `error` if an error occurred during the listener \n           starting process\n","isDeprecated":false}],"name":"\u0027start","description":"Starts the registered service programmatically.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"An `error` if an error occurred during the listener\n           stopping process\n","isDeprecated":false}],"name":"gracefulStop","description":"Stops the service listener gracefully. Already-accepted requests will be\nserved before connection closure.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"An `error` if an error occurred during the listener\n           stop process\n","isDeprecated":false}],"name":"immediateStop","description":"Stops the service listener immediately. It is not implemented yet.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"service object {} ","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"s","description":"Type descriptor of the service\n","isDeprecated":false}],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"`()` or else a `tcp:Error` upon failure to detach the service\n","isDeprecated":false}],"name":"detach","description":"Stops consuming messages and detaches the service from the `tcp:Listener`.\n```ballerina\n    # tcp:error? result \u003d tcpListener.detach(helloService);\n    # ```\n\n","isDeprecated":false}],"initMethod":{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"int","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"localPort","description":"The port number of the remote service\n","isDeprecated":false}],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"","isDeprecated":false}],"name":"init","description":"Initializes the TCP listener based on the privovided configurations. \n```ballerina\n    #  listener Listener|error? server1 \u003d new (8080);\n    # ```\n","isDeprecated":false},"otherMethods":[{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"An `error` if an error occurred during the listener \n           starting process\n","isDeprecated":false}],"name":"\u0027start","description":"Starts the registered service programmatically.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"An `error` if an error occurred during the listener\n           stopping process\n","isDeprecated":false}],"name":"gracefulStop","description":"Stops the service listener gracefully. Already-accepted requests will be\nserved before connection closure.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"An `error` if an error occurred during the listener\n           stop process\n","isDeprecated":false}],"name":"immediateStop","description":"Stops the service listener immediately. It is not implemented yet.\n\n","isDeprecated":false},{"isIsolated":true,"isRemote":false,"isExtern":false,"parameters":[{"defaultValue":"","type":{"name":"service object {} ","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"s","description":"Type descriptor of the service\n","isDeprecated":false}],"returnParameters":[{"type":{"name":"error","category":"builtin","isAnonymousUnionType":false,"isArrayType":false,"isNullable":true,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},"name":"","description":"`()` or else a `tcp:Error` upon failure to detach the service\n","isDeprecated":false}],"name":"detach","description":"Stops consuming messages and detaches the service from the `tcp:Listener`.\n```ballerina\n    # tcp:error? result \u003d tcpListener.detach(helloService);\n    # ```\n\n","isDeprecated":false}],"isReadOnly":false,"isIsolated":false,"name":"Listener","description":"This is used for creating TCP server endpoints. A TCP server endpoint is\ncapable of responding to remote callers. The `Listener` is responsible for\ninitializing the endpoint using the provided configurations.\n","isDeprecated":false}],"functions":[],"constants":[],"annotations":[],"errors":[{"detailType":{"isAnonymousUnionType":true,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"GenericError","category":"errors","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0},{"orgName":"ballerina","moduleName":"tcp","version":"0.8.0-alpha4","name":"ReadTimedOutError","category":"errors","isAnonymousUnionType":false,"isArrayType":false,"isNullable":false,"isTuple":false,"isIntersectionType":false,"isParenthesisedType":false,"isTypeDesc":false,"isRestParam":false,"isLambda":false,"isReadOnly":false,"isDeprecated":false,"generateUserDefinedTypeLink":true,"memberTypes":[],"paramTypes":[],"arrayDimensions":0}],"paramTypes":[],"arrayDimensions":0},"name":"Error","description":"Represents tcp module related errors.\n","isDeprecated":false},{"name":"GenericError","description":"Represents generic tcp error, which contains the information related to the error.\n","isDeprecated":false},{"name":"ReadTimedOutError","description":"This will returns once the given read timed out time exceed for socket reads.\n","isDeprecated":false}],"types":[],"enums":[]}],"name":"tcp","orgName":"ballerina","version":"0.8.0-alpha4","summary":"This package provides an implementation for sending/receiving messages to/from another application process (local or remote) for both connection-oriented protocols.\n"}]};