print fibonacci series by creating a socket using server client architecture
#1

write a client/server program using sockets (UDP or TCP) that will prompt the client user a number n, the server compute the fibonacci nth term and returns back to the client.
Reply
#2
import java.net.*;
import java.io.*;

class tcpip_server
{
public static void main(String args[]) throws IOException
{
ServerSocket n1=null;
try
{
n1=new ServerSocket(98);
}
catch(IOException e)
{
System.err.println("Port 98 could not be found");
System.exit(1);
}
Socket c=null;
try
{
c=n1.accept();
System.out.println("Connection from "+c);
}
catch(IOException e)
{
System.out.println("Accept failed");
System.exit(1);
}
PrintWriter out=new PrintWriter(c.getOutputStream(),true);
BufferedReader in=new BufferedReader(new InputStreamReader(c.getInputStream()));
String n;
BufferedReader sin=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Ready to type now");
while((n=sin.readLine())!=null)
{
out.println(n);
}
out.close();
c.close();
n1.close();
}
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: seminar on client server architecture pdf, sequencia de fibonacci labview, project on client server architecture in ppt, lamport algorithm in java using socket, client server architecture in software engineering ppt, java program using socket interface for client server program, implement fibonacci series using udp server socket ppt,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  source code for task scheduling using genetic algorithm using java 2 8,709 11-04-2017, 08:31 PM
Last Post: Guest
  self inductance of a coil depends by observing the effect of this coil in a series with resistor in a circuit fed up by 2 1,502 01-10-2016, 09:27 PM
Last Post: Guest
  vernacular architecture in gujarat ppt 2 740 22-08-2016, 10:58 AM
Last Post: seminar report asees
  simputer architecture 3 619 21-07-2016, 03:21 PM
Last Post: jaseela123d
  ppt on palm print authentication application 1 638 16-07-2016, 04:06 PM
Last Post: surajtp
  load flow solution using newton raphson method using pscad 1 1,533 24-06-2016, 02:53 PM
Last Post: seminar report asees
  fourier series application in automobile engineering 1 640 23-06-2016, 04:06 PM
Last Post: seminar report asees
  system architecture diagram for hrms 1 535 18-06-2016, 11:07 AM
Last Post: dhanabhagya
  blade server interview questions and answers pdf 1 875 11-06-2016, 03:48 PM
Last Post: dhanabhagya
Wink software architecture notes by ashok kumar 1 888 31-05-2016, 10:31 AM
Last Post: dhanabhagya

Forum Jump: