Jump to content
xisto Community
HmmZ

Chat Port? Java

Recommended Posts

I have made a small piece of code for a java chat and i need a port to connect to, i tried the cpanel display (2082) and port 21(as seen in many posts when using search), but both seem to give errors in the chat, in the sense of displaying really strange things (html code for cpanel and for port 21 it continuously returns 500 ?).

 

I have installed the chat the following way:

base root directory/chat-folder/chat-client/webpages/chat-client12.html

(wich is in the same directory as where www/public_html and public_ftp are located)

and

public_html/chat-folder/chat-client/webpages/chat-client12.html

 

I was able to locate the server ip (as shown in cPanel) but all i need is a valid port to connect to...is there any way? (and no i dont wanna use phpmychat or cgi-chat)

Share this post


Link to post
Share on other sites

You can't just connect to any given port that is already in use and expect it to magically work. I'm not exactly sure of what program you are using, but if it isn't peer-to-peer (ie. connects would-be chatters directly to each other), then it needs to have a server listening somewhere on a specified port. I believe it is a violation of Xisto's TOS to run resident programs on the server, so I don't think it's a great option. Unless I have taken this entirely the wrong way, and completely misunderstood what you're asking.The way most CGI web-based chat systems work is by storing all received messages in the database, which is then periodically checked by the script and delivered to each user in that chat session. Which is why you may have noticed your window constantly reloading if you've ever used such a system.I would recommend you either get someone to host an IRC channel or an operating chat server for you, or let the idea go. Unless, as I've already said, I've taken something the wrong way.

Share this post


Link to post
Share on other sites

Alright, to make it more clear (although i think you fully understand what i meant), heres the install description from the creators website


3. If you're using Linux on an x86 server, then a precompiled copy of the chat server program (chatserver) is already in the chat-server/bin/ subdirectory. If you have a different environment or you just feel like recompiling the code again, go to the chat-server/src/ directory and type:     make This should recompile the chatserver again. Move the compiled program into an appropriate directory, if necessary. 3.1. You can also recompile the chat-client java source code, if you make any changes to it or simply feel the urge to do it for no particular reason. If you wish to do this, simply go to the appropriate directories (chat-client/java_1.x_src/) and recompile the *.java files. If you're on a *nix environment AND have a java compiler installed, there is a Makefile in each directory so that you can also type make to recompile the project. Don't forget to move the *.class files that are generated by the compiler to the appropriate webpages/ directory! 4. If the chatserver program is not on your webserver, then transfer it to your webserver now. Execute the chatserver program on your webserver by typing:     ./chatserver 6668 This should start up the chat server program and tell it to listen for connections. Note that 6668 is a port # that the chat server should listen for connections on. If you wish to use a different port #, feel free to change the command appropriately. Normally, you should choose port numbers that are greater than 1024. You can also optionally place a text file called motd.cf in the same directory as the chatserver program. This file contains the message of the day that will be displayed automatically to the user when a chat session is initiated. Edit the motd.cf file to customize your own start up messages or place an advertisement or whatever. Only ensure that the length of each line in this file does NOT exceed 80 characters. 5. Determine the IP address of your webserver. Go to the directory chat-client/webpages/ and edit the files chatclient_11.php and chatclient_12.php. Change the IP parameter of both files to the IP of your webserver. If you started the chat server in the step above with a port # other than 6668, then change the port parameter to the appropriate number as well. 6. Move the files under the chat-client/webpages/ directory to your webserver. 7. Open a web browser and navigate to http://(your website URL)/chat-client/webpages/javachat.html 8. From the page above, select either of the links to try out the AWT or the Swing chat client. If you're having trouble setting it all up or you want to have some features added to this program, please let me know. All suggestions are welcome.


Source: Mayukh


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.