Results 1 to 2 of 2

Thread: Sockets

  1. #1
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default Sockets

    Hi,
    I'm thinking to make a little server, where for example, I host the server, and my friend goes on the client, the client is on my website. My friend enters his username+password, then the applet will look on the server's customers folder and check if there is a file named "username.txt", and if it is it will go on the file and check the password, and if they mach it will contunue, if not then it will go back to the login screen, but if the username does not exsit it will create a new file in the customers folder.

    is there any good examples?

    Sorry if that doensn't make sence.
    Last edited by PhQ; 05-03-2010 at 08:38 PM.

  2. #2
    Singing Boyo is offline Senior Member
    Join Date
    Mar 2009
    Posts
    552
    Rep Power
    6

    Default

    Not really good examples as such. It's not a program that would be commonly used, as most user-password data is either in a database, or all stored in a single file. In any case, assuming you know file I/O, you just need to learn about sockets. You'll also need to think up a very small protocol (username-newline-password-newline?) for sending passwords. Anyways, a tutorial on sockets that I found useful is here:

    Java Tutorials - Sockets
    If the above doesn't make sense to you, ignore it, but remember it - might be useful!
    And if you just randomly taught yourself to program, well... you're just like me!

Similar Threads

  1. Problem (sockets)
    By Blacknight962 in forum New To Java
    Replies: 3
    Last Post: 08-16-2009, 01:56 AM
  2. Sockets NIO
    By aamp in forum New To Java
    Replies: 3
    Last Post: 01-15-2009, 11:56 AM
  3. Threads + Sockets
    By Tomdarkness in forum New To Java
    Replies: 1
    Last Post: 12-24-2008, 01:06 AM
  4. Sockets
    By Zosden in forum Networking
    Replies: 16
    Last Post: 05-27-2008, 05:55 PM
  5. Help with Sockets
    By Eric in forum Networking
    Replies: 3
    Last Post: 12-01-2007, 09:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •