Wowza Community

Custom Socket Server under server-side Wowza Module

Dear colleagues

I have question, that is caused (may be) by lack of experience in Wowza. I have working Wowza application and server-side module within it, that contains my customized onAppStart-method of my application. I inserted code into onAppStart, that creates and starts Java ServerSocket on some port (for example, 1990). Operation system is Linux. After Wowza had started, process on this port is seen by netstat-command, but it does not respond on client requests! When I try, “telnet 1990” or try to reach port 1990 with some client java-code, accept-method of my ServerSocket is not fired, and client has not any response. But, when I run this server code as separate java-program (not related to Wowza) from command-line, that is all OK: accept-method fires on the server-side and all clients get responses, What is reason? May be, this trick is generally forbidden for Wowza and wowza proposed it’s own means for sockets on the server side? Of course, I know about HTTP Providers, but I do not understand, how to identify and store client of HTTPProvider in order to maintain chain of requests from the same client. That is why I want to write my own socket server. I also known about mina-package, but I have not found any tutorials and code samples. Could you explain, how I can make working serversocket, starting from Wowza module or correctly apply some other approach?

Sincerely, Iliya


Not quite what you’re asking, but could creating your own HostPort be an alternative option? This will create the socket for you. It would then be up to you to determine what to do when connections come in to that port, maybe via a custom Host Provider/event listener.