Skip to content

class Socket

Oliver edited this page Apr 25, 2020 · 1 revision

www/php-ircbot/Classes/Library/IRC/Connection/Socket.php


Socket

Package

IRCBot\Library

Implements

\Library\IRC\Connection

author

Overview

Public Properties

server() |

Constants

No constants found

Public Methods

__destruct() | connect() | disconnect() | getData() | isConnected() | sendData() | setPort() | setServer() |

Properties

port

The port of the server you want to connect to.

private $port : int

Array

server

The server you want to connect to.

public $server : string

Array

socket

The TCP/IP connection.

private $socket : \Library\IRC\Connection\type

Array

Methods

__destruct()

Close the connection.

public __destruct() : mixed

connect()

Establishs the connection to the server.

public connect() : mixed

disconnect()

Disconnects from the server.

public disconnect() : bool

getData()

Returns data from the server.

public getData() : string|bool

isConnected()

Check wether the connection exists.

public isConnected() : bool

sendData()

Interaction with the server.

For example, send commands or some other data to the server.

public sendData(mixed $data) : int|bool

setPort()

Sets the port.

E.g. 6667

public setPort(int $port) : mixed

setServer()

Sets the server.

E.g. irc.quakenet.org or irc.freenode.org

public setServer(string $server) : mixed


\ » Classes » Socket

Clone this wiki locally