Method and apparatus for handling events received at a server socket
First Claim
1. A method of handling events received at sockets in a computer server configured to serve clients, the method comprising:
- executing a polling module configured to poll server sockets to detect events received at said sockets;
registering a first plurality of sockets with said polling module, wherein each of said sockets in said first plurality of sockets is associated with an event consumer;
notifying a first event consumer associated with a first socket in said first plurality of sockets when a first event is received at said first socket; and
invoking a task configured to facilitate handling of said first event;
wherein a first processor thread is shared among said first plurality of sockets for said polling; and
wherein one or more processor threads are allocated to the execution of tasks invoked by said event consumers.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus are provided for handling events received at a media streaming server. Server sockets configured to receive events are registered with a polling object and may be divided into collections. Each collection shares a processor thread for detecting events. Each socket is associated with an event consumer object that is notified when an event is received at the socket. The event consumer objects invoke task objects to handle the events. Task objects are queued in a task queue and execute using a pool of processor threads. Event consumer objects are derived from an abstract base consumer class that defines a common interface. Subclasses of the base consumer class are configured for different types of events that may be received (e.g., connection requests, media streaming commands, media data, media stream quality reports). Specific event consumer objects are instantiated from the subclasses to provide implementations of the common interface.
-
Citations
23 Claims
-
1. A method of handling events received at sockets in a computer server configured to serve clients, the method comprising:
-
executing a polling module configured to poll server sockets to detect events received at said sockets;
registering a first plurality of sockets with said polling module, wherein each of said sockets in said first plurality of sockets is associated with an event consumer;
notifying a first event consumer associated with a first socket in said first plurality of sockets when a first event is received at said first socket; and
invoking a task configured to facilitate handling of said first event;
wherein a first processor thread is shared among said first plurality of sockets for said polling; and
wherein one or more processor threads are allocated to the execution of tasks invoked by said event consumers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method of handling events received at a server configured to stream media to clients, wherein processor resources within the server are allocated in the form of threads, comprising:
-
polling one or more registered server sockets for events received at the server from clients, wherein each registered socket is associated with an event consumer configured to handle an event received at the registered socket;
receiving a client connection request at a first socket;
notifying a first event consumer of the connection request, wherein said first event consumer is associated with said first socket;
registering a second socket configured to receive media streaming commands through a connection established in response to said client connection request;
receiving at said second socket a media streaming command from the client;
notifying a second event consumer of the command, wherein said second event consumer is associated with said second socket; and
issuing one or more tasks configured to execute the media streaming command;
wherein a first thread is shared among a first collection of sockets comprising said first socket and said second socket; and
wherein a set of threads is allocated to said one or more tasks. - View Dependent Claims (12, 13)
-
-
14. A computer readable storage medium storing instructions that, when executed by a computer, cause the computer to perform a method of handling events received at a server configured to stream media to clients, wherein processor resources within the server are allocated in the form of threads, the method comprising:
-
polling one or more registered server sockets for events received at the server from clients, wherein each registered socket is associated with an event consumer configured to handle an event received at the registered socket;
receiving a client connection request at a first socket;
notifying a first event consumer of the connection request, wherein said first event consumer is associated with said first socket;
registering a second socket configured to receive media streaming commands through a connection established in response to said client connection request;
receiving at said second socket a media streaming command from the client;
notifying a second event consumer of the command, wherein said second event consumer is associated with said second socket; and
issuing one or more tasks configured to execute the media streaming command;
wherein a first thread is shared among a first collection of sockets comprising said first socket and said second socket; and
wherein a set of threads is allocated to said one or more tasks.
-
-
15. A computer readable storage medium containing a data structure configured for facilitating the handling of events received at communication sockets in a media streaming server, the data structure comprising:
-
a plurality of socket identifiers, wherein each socket identifier is configured to identify a server socket established to receive a media streaming event; and
for each of said sockets, a reference to an event consumer configured to handle said event by invoking a set of tasks;
wherein a single processor thread is shared among said plurality of sockets for detecting said events; and
wherein a set of processor threads is allotted to the execution of said tasks invoked by said event consumers.
-
-
16. An apparatus for handling media streaming events, comprising:
-
a polling module configured to poll sockets, wherein said sockets are configured to receive media streaming events from clients;
a polltable comprising a first set of sockets polled by said polling module, wherein a first processor thread is dedicated to said polling of said first set of sockets;
a listener module configured to;
receive a request for a media streaming control connection through a first socket in said first set of sockets; and
establish the requested media streaming control connection through a second socket in said first set of sockets;
a connection module configured to receive a media streaming command through said second socket; and
a third socket configured to stream media. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23)
-
Specification