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: client server architecture in atm machine pdf, network server architecture, series inverter using scr theory, project on client server architecture in ppt, data transmission using multi socket, fibonacci series verilog code, print fibonacci series by creating a socket using server client architecture,

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

Forum Jump: