Overview

Namespaces

  • Budabot
    • Core
      • Modules
    • User
      • Modules
  • None
  • Tyrence
    • Modules

Classes

  • AccessManager
  • AdminManager
  • AOChat
  • AOChatPacket
  • AOChatQueue
  • AOExtMsg
  • AsyncHttp
  • AutoInject
  • BotRunner
  • Budabot
  • BuddylistManager
  • CacheManager
  • CacheResult
  • ClassLoader
  • ColorSettingHandler
  • CommandAlias
  • CommandManager
  • ConfigFile
  • DB
  • DBRow
  • EventLoop
  • EventManager
  • GuildChannelCommandReply
  • GuildManager
  • HelpManager
  • Http
  • HttpRequest
  • LegacyLogger
  • LimitsController
  • LoggerWrapper
  • MMDBParser
  • NumberSettingHandler
  • OptionsSettingHandler
  • PlayerHistory
  • PlayerHistoryManager
  • PlayerManager
  • Preferences
  • PrivateChannelCommandReply
  • PrivateMessageCommandReply
  • Registry
  • SettingHandler
  • SettingManager
  • SettingObject
  • SocketManager
  • SocketNotifier
  • SubcommandManager
  • Text
  • TextSettingHandler
  • Timer
  • TimerEvent
  • TimeSettingHandler
  • Util
  • xml

Interfaces

  • CommandReply

Exceptions

  • InvalidHttpRequest
  • SQLException
  • StopExecutionException

Functions

  • isWindows
  • Overview
  • Namespace
  • Class

Class SocketNotifier

The SocketNotifier class provides a way to be notified when some activity happens in a socket.

You can add instance of SocketNotifier to Budabot's event loop with method SocketManager::addSocketNotifier() and remove it with SocketManager::removeSocketNotifier().

When some activity happens in the given socket the event loop will call the given callback to notify of the activity.

Namespace: Budabot\Core
Located at SocketNotifier.class.php
Methods summary
public
# __construct( $socket, $type, $callback )

Constructor method.

Constructor method.

Parameters

$socket
socket to listen
$type
of activity
$callback
callback which is called on socket activity
public
# getSocket( )

Returns the socket resource.

Returns the socket resource.

public
# getType( )

Returns type of the activity.

Returns type of the activity.

public
# notify( $type )

Calls the callback and passes given @a $type to the callback.

Calls the callback and passes given @a $type to the callback.

Constants summary
integer ACTIVITY_READ
# 1
integer ACTIVITY_WRITE
# 2
integer ACTIVITY_ERROR
# 4
Properties summary
private $socket
#
private $type
#
private $callback
#
Budabot 4 Docs API documentation generated by ApiGen