Results 1 to 3 of 3
Thread: [Socket] Send audio data
- 12-11-2010, 08:00 PM #1
-
- 12-15-2010, 07:31 PM #3
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
Once you've loaded a WAV file, it's just bytes. You can send it over sockets like anything else.
pseudo-code for server
pseudo code for clientJava Code:ServerSocket serverSocket = new ServerSocket(port); Socket socket = serverSocket.accept(); socket.getOutputStream().write(bytes);
There are a *lot* of detailes obscured in these code snippets, such as error handling, how to deal with multiple clients on the server using multiple threads, clean up of the sockets when you shut them down, fully reading off a socket, etc.Java Code:Socket socket = new Socket(host, port); socket.getInputStream().read(bytes); ...
Similar Threads
-
How to send folder through a connected socket
By Chris555 in forum NetworkingReplies: 0Last Post: 07-18-2009, 11:41 AM -
Server socket - send image to client
By Hinty in forum NetworkingReplies: 2Last Post: 03-14-2009, 07:39 AM -
to send float array with TCP socket
By zeyneqp in forum NetworkingReplies: 6Last Post: 08-30-2008, 03:48 AM -
Send an array via Socket
By lene in forum NetworkingReplies: 0Last Post: 04-23-2008, 04:29 PM -
send files through socket
By bbq in forum Advanced JavaReplies: 1Last Post: 06-05-2007, 02:08 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks