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: data transmission using multi tasking socket ieee pdf, wireless usb print server, fibonacci verilog, fibonacci number generator verilog code, project on client server architecture in ppt, data transmission using multi tasking socket ieee, seminar on client server architecture pdf,

[-]
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,444 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,469 01-10-2016, 09:27 PM
Last Post: Guest
  vernacular architecture in gujarat ppt 2 722 22-08-2016, 10:58 AM
Last Post: seminar report asees
  simputer architecture 3 595 21-07-2016, 03:21 PM
Last Post: jaseela123d
  ppt on palm print authentication application 1 620 16-07-2016, 04:06 PM
Last Post: surajtp
  load flow solution using newton raphson method using pscad 1 1,504 24-06-2016, 02:53 PM
Last Post: seminar report asees
  fourier series application in automobile engineering 1 620 23-06-2016, 04:06 PM
Last Post: seminar report asees
  system architecture diagram for hrms 1 514 18-06-2016, 11:07 AM
Last Post: dhanabhagya
  blade server interview questions and answers pdf 1 857 11-06-2016, 03:48 PM
Last Post: dhanabhagya
Wink software architecture notes by ashok kumar 1 862 31-05-2016, 10:31 AM
Last Post: dhanabhagya

Forum Jump: