Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Reti di calcolatori > Esame 11\06\07 LABORATORIO
Pages (3): [1] 2 3 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
smigol79
.simpatizzante.

User info:
Registered: Apr 2005
Posts: 18 (0.00 al dì)
Location:
Corso: comunicazione digitale
Anno: 2
Time Online: 17:34:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Esame 11\06\07 LABORATORIO

Ciao.
Volevo chidere se qualcuno è riuscito a scrivere un Client funzionante per collegarsi al server del prof?:?

11-06-2007 22:45
Click Here to See the Profile for smigol79 Click here to Send smigol79 a Private Message Find more posts by smigol79 Add smigol79 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nitro84
.arcimaestro.

User info:
Registered: Feb 2004
Posts: 422 (0.05 al dì)
Location: cesano boscone
Corso: comunicazione digitale
Anno: 3
Time Online: 2 Days, 11:25:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: Esame 11\06\07 LABORATORIO

Originally posted by smigol79
Ciao.
Volevo chidere se qualcuno è riuscito a scrivere un Client funzionante per collegarsi al server del prof?:?


io l'ho fatto così e funzionava perfettamente



import java.net.*;
import java.io.*;

class Test {
public static void main (String args[]) throws Exception {

InetAddress addr = InetAddress.getByName("jli.dico.unimi.it");
Socket sock = new Socket(addr, 12345);

BufferedReader read = new BufferedReader(new InputStreamReader(sock.getInputStream()));

int matricola=xxx;

DataOutputStream mrite = new DataOutputStream(sock.getOutputStream());
mrite.writeBytes(""+matricola +"\n");
String vals = read.readLine();

int val = Integer.parseInt(vals);

long c = 0;
long a=0;
long b=-1;
for (int i=2 ; i<val ; i++) {
c = a + b;
a = b;
b = c;
}
DataOutputStream rite = new DataOutputStream(sock.getOutputStream());

rite.writeBytes(""+c +"\n");

sock.close();
}
}

12-06-2007 08:04
Click Here to See the Profile for nitro84 Click Here to See the Blog of nitro84 Click here to Send nitro84 a Private Message Find more posts by nitro84 Add nitro84 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nitro84
.arcimaestro.

User info:
Registered: Feb 2004
Posts: 422 (0.05 al dì)
Location: cesano boscone
Corso: comunicazione digitale
Anno: 3
Time Online: 2 Days, 11:25:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

il mio era il caso con b=-1 se no c'erano altri che avevano b=1 va bè cambia poco..

12-06-2007 08:05
Click Here to See the Profile for nitro84 Click Here to See the Blog of nitro84 Click here to Send nitro84 a Private Message Find more posts by nitro84 Add nitro84 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Totò_7
.consigliere.

User info:
Registered: Dec 2005
Posts: 128 (0.02 al dì)
Location: Nova Milanese
Corso: Comunicazione Digitale
Anno: 3
Time Online: 2 Days, 13:41:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: Re: Esame 11\06\07 LABORATORIO

Originally posted by nitro84
io l'ho fatto così e funzionava perfettamente
import java.net.*;
import java.io.*;
...
class Test {
...
... }



una domanda sul codice????
xkè hai creato due canali di DataoutputStream????
io ieri l'ho fatto....era molto simile al tuo....le uniche cose che cambiavano sono :

-invece di int matricola=xxx;mrite.writeBytes(""+matricola +"\n");
ho messo String matricola=.. ;mrite.writeBytes(matricola +"\n");

è un'errore non mettere lo spazio prima di matricola???

-In più invece di usare 2 canali di output ne ho usato solo uno...
la variabile c la inviavo con lo stesso canale che ho usato x inviare matricola.....è sbagliato???

il mio client funzionava...stampavo c....xò rimaneva in TO....e non riesco a capire il motivo!!!!!qualcuno può aiutarmi?????
Può essere un problema dello spazio "" prima di matricola????o servono x forza 2 canali di output???
grazie

12-06-2007 08:24
Click Here to See the Profile for Totò_7 Click here to Send Totò_7 a Private Message Find more posts by Totò_7 Add Totò_7 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Penso che se nel file di log ti veniva scritto "OK" allora è giusto!

12-06-2007 09:01
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
escanor
.consigliere.

User info:
Registered: Jun 2004
Posts: 137 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno:
Time Online: 1 Day, 19:58:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma i voti usciranno entro l'anno?:D

12-06-2007 09:16
Click Here to See the Profile for escanor Click here to Send escanor a Private Message Find more posts by escanor Add escanor to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

A gennaio sono usciti lo stesso giorno dell'esame solo che si era finito prima ed eravamo molto meno rispetto a ieri! Boh forse usciranno in giornata oppure ci tocca aspettare qualche giorno!

12-06-2007 09:22
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Totò_7
.consigliere.

User info:
Registered: Dec 2005
Posts: 128 (0.02 al dì)
Location: Nova Milanese
Corso: Comunicazione Digitale
Anno: 3
Time Online: 2 Days, 13:41:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by ARIEL
Penso che se nel file di log ti veniva scritto "OK" allora è giusto!

il problema è proprio questo....nel file log non mi dava OK...rimaneva TO...

12-06-2007 09:25
Click Here to See the Profile for Totò_7 Click here to Send Totò_7 a Private Message Find more posts by Totò_7 Add Totò_7 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Allora mi sa che non funzionava giusto probabilmente è per la mancanza dell "" so che davano dei problemi ovvero il TO

12-06-2007 09:27
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Totò_7
.consigliere.

User info:
Registered: Dec 2005
Posts: 128 (0.02 al dì)
Location: Nova Milanese
Corso: Comunicazione Digitale
Anno: 3
Time Online: 2 Days, 13:41:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

:evil:

Originally posted by ARIEL
Allora mi sa che non funzionava giusto probabilmente è per la mancanza dell "" so che davano dei problemi ovvero il TO

che nervoso.....quindi il mio client era giusto e x un "" non funzionava correttamente e dovrò rifare tt....:evil:
:evil:
:evil:

12-06-2007 09:30
Click Here to See the Profile for Totò_7 Click here to Send Totò_7 a Private Message Find more posts by Totò_7 Add Totò_7 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

L'hai sottoposto al prof? boh magari te lo fa passare ugualmente anche se di solito passava a controllare se funzionava prima di fartelo uploadare a lui!

12-06-2007 09:31
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Totò_7
.consigliere.

User info:
Registered: Dec 2005
Posts: 128 (0.02 al dì)
Location: Nova Milanese
Corso: Comunicazione Digitale
Anno: 3
Time Online: 2 Days, 13:41:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Si l'ha guardato...ma mi ha detto che se rimaneva in TO non andava bene....quindi ho dovuto abbandonare...
e ho visto che sottoponeva il server...come se non avessi fatto nulla...

12-06-2007 09:34
Click Here to See the Profile for Totò_7 Click here to Send Totò_7 a Private Message Find more posts by Totò_7 Add Totò_7 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Pupino
- D J -

User info:
Registered: Nov 2003
Posts: 4223 (0.52 al dì)
Location: Paese dei Balocchi
Corso: Buenos aires
Anno: 2008 :)
Time Online: 27 Days, 15:16:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Qualcuno si ricorda il testo? Anche via pm... ;)

__________________

PUPINO'S VIDEO
:asd:
FRANK JAY
:!:

UN BLOG :look:

12-06-2007 10:35
Click Here to See the Profile for Pupino Click Here to See the Blog of Pupino Click here to Send Pupino a Private Message Visit Pupino's homepage! Find more posts by Pupino Add Pupino to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Totò_7
.consigliere.

User info:
Registered: Dec 2005
Posts: 128 (0.02 al dì)
Location: Nova Milanese
Corso: Comunicazione Digitale
Anno: 3
Time Online: 2 Days, 13:41:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Pupino
Qualcuno si ricorda il testo? Anche via pm... ;)

non c'era un vero e proprio testo...
l'unica cosa era questo commento all'inizio del server

// Test d'esame: scrivere un client compatibile con questo server.
// Questo server e' installato sullo host "jli.dico.unimi.it" ed
// e' in ascolto sulla porta 12345 di detta macchina. Osservare
// che il client dovra' inviare al server, come prima informazione,
// il numero di matricola della/del candidata/o, come specificato
// nei commenti che si trovano sparsi nel codice.

12-06-2007 11:02
Click Here to See the Profile for Totò_7 Click here to Send Totò_7 a Private Message Find more posts by Totò_7 Add Totò_7 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Il testo non c'è o meglio lui ti da un server tu lo devi analizzare e capire da solo cosa invia e cosa riceve e devi creare un client compatibile!

12-06-2007 11:13
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 04:42.    Post New Thread    Post A Reply
Pages (3): [1] 2 3 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.133 seconds (62.92% PHP - 37.08% MySQL) con 26 query.