Results 1 to 4 of 4
- 11-07-2010, 03:40 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 14
- Rep Power
- 0
Sending a message to a flash chat
Hey everyone,
Basically I want to make a bot for a flash chatroom (chatango), but at the moment my number one main goal is just to make it display a message in the chatroom then I can take it from there.
Basically I only have this information:
String server = "www.<anychatroom>.chatango.com";
int port = 80;
Socket myBot = new Socket( server, port );
addr = myBot.getInetAddress();
System.out.println("Connected to " + addr);
I had a try and catch clause around it but you get the picture, it says I connected, it displays the IP address as well of the chatroom.
Now this is where I get stuck, anyone care to help, I basically just want to display a message in the chatroom via the code meaning I just type a message in the source code and run the code and see it display in the chatroom.
Appreciate any help, thank you.
-
Have you tried connecting to the socket's (myBot's) input and output streams yet?
- 11-08-2010, 08:18 AM #3
Member
- Join Date
- Nov 2010
- Posts
- 14
- Rep Power
- 0
Hey,
I found out how to post a message.
Now I want to retrieve messages, at the moment I have this;
sockInput = new BufferedReader( new InputStreamReader( sock.getInputStream() ) );
sockInput.readLine().trim().toString(); <-- in a system.out.print clause
And Im getting like RAW data or Garbage with the message in there, here is what I am getting.
i:1289204103.9:Getsuga::56914708::3J20xFm6OwM_og== ::12:<nF5BE1B/><f x14FF3C02="1">i'm saying you need to cure your anxiety and i have th answer
<p><f x12666="0">Lol</f></p><p><f x12666="0">Calm down.</f></p><p><f x12666="0">>_></f></p>
i:1289204028.59:kurtCobain::50437136::3J20xFm6NQQw ow==::0:<f x14="0">shhhh
i:1289204005.11:Shark::46350389::3J20xFm6NAY-pA==::12:<nC/><f x110FF="1">heroes?
p:getsuga:1
b:1289204111.37:Gouken::86492368::8::0:MESSAGAGE:=
The word MESSAGE: <--- that I pretyped in, Gouken is my Bot in the FLASH chatroom, as you can see, you can see peoples usernames, and there messsages with a bunch of jumbled crap, anyways of fixing this ? Like a filter of some sorts ?
-
You need to find out what this "jumbled crap" is. Is it HTML? XML? This is less a Java issue and more of your finding out how the chatroom transmits messages.
Similar Threads
-
Help sending messages using TCP with small chat application
By Ernie- in forum NetworkingReplies: 7Last Post: 03-28-2009, 06:20 PM -
Sending MTOM Attachment through SOAP message
By suchismitasuchi in forum Advanced JavaReplies: 0Last Post: 01-19-2009, 01:22 PM -
[SOLVED] Sending a message to clients using RMI
By ChrisMayhew in forum New To JavaReplies: 11Last Post: 01-12-2009, 07:29 PM -
sending the message from trigger to mailid
By geeta_ravikanti in forum JDBCReplies: 0Last Post: 04-04-2008, 11:09 AM -
123 Flash Chat 6.6
By levent in forum Java SoftwareReplies: 0Last Post: 06-05-2007, 12:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks