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 > [Info] Esame 23/02
Pages (2): « 1 [2]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
mafalda
.illuminato.

User info:
Registered: Oct 2002
Posts: 233 (0.03 al dì)
Location: far far away
Corso: TICOM
Anno: ehm..
Time Online: 5 Days, 4:07:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

aggiungo una cosa...
al posto che mandare la lunghezza della string all'altro non si potrebbe dirgli di leggere finche' ci sono caratteri disponibili (con available) nella Stream?
resta ancora da chiarire la questione dei msg COMPLETI...

__________________
:approved:

27-02-2004 19:31
Click Here to See the Profile for mafalda Click here to Send mafalda a Private Message Find more posts by mafalda Add mafalda to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
devil
.grande:maestro.

User info:
Registered: Dec 2002
Posts: 555 (0.07 al dì)
Location: .:AR:.
Corso: Banking & Finance
Anno: Finito da un bel po'!
Time Online: 11 Days, 5:41:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by mafalda
aggiungo una cosa...
al posto che mandare la lunghezza della string all'altro non si potrebbe dirgli di leggere finche' ci sono caratteri disponibili (con available) nella Stream?...


La lunghezza della stringa serve per dirgli la lunghezza dell'array da allocare in modo che se sulla socket ci sono "SMACK SMACK SMACK SM" lui sa già che la stringa sarà lunga 6 caratteri e allocherà 3 array di 6 byte ciascuno.

_se gli dici di leggere fino a che non ci sono caratteri sulla socket devi fare in modo che prima ci siano tutte le scritture sulla socket e solo una volta finite inizino tutte le letture.

Se fai in tempo reale (scrivo e leggo allo stesso tempo) si rischia di uscire dal ciclo di while prima di aver letto tutto il messaggio.

p.s. cmq secondo me si sta rilevando un po' troppo complicato questo programma...:sad:

Last edited by devil on 28-02-2004 at 14:39

28-02-2004 14:31
Click Here to See the Profile for devil Click Here to See the Blog of devil Click here to Send devil a Private Message Visit devil's homepage! Find more posts by devil Add devil to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
mafalda
.illuminato.

User info:
Registered: Oct 2002
Posts: 233 (0.03 al dì)
Location: far far away
Corso: TICOM
Anno: ehm..
Time Online: 5 Days, 4:07:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by devil


p.s. cmq secondo me si sta rilevando un po' troppo complicato questo programma...:sad:


Anche secondo me...ci vorrebbe una illuminazione dal prof...:-D

__________________
:approved:

28-02-2004 14:56
Click Here to See the Profile for mafalda Click here to Send mafalda a Private Message Find more posts by mafalda Add mafalda to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ripe
- up in the mountains -

User info:
Registered: Jun 2002
Posts: 9469 (1.10 al dì)
Location: Cinisellooo
Corso: TICO TICO
Anno: Primo
Time Online: 61 Days, 2:33:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma perchè pensate ad usare gli array? Ha dato giusto giusto le funzioni per manipolare le stringhe! Con charAt() trovate il carattere alla posizione che desiderate e per concatenare due stringhe fate come fareste normalmente in un messaggio di output. Voi ad ogni passaggio fate un controllo per vedere se la stringa scritta fino a quel momento è "smack" e se lo è resettate la stringa di ricezione, altrimenti continuate ad attendere altre lettere nel ciclo.

:)

__________________
«And if you ever smell christian blood up in the mountains, then get your axe and chop them down!»

01-03-2004 09:41
Click Here to See the Profile for ripe Click Here to See the Blog of ripe Click here to Send ripe a Private Message Find more posts by ripe Add ripe to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
mafalda
.illuminato.

User info:
Registered: Oct 2002
Posts: 233 (0.03 al dì)
Location: far far away
Corso: TICOM
Anno: ehm..
Time Online: 5 Days, 4:07:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

anche io la penso come te, anche perche' all'esame ho usato quelli e mi parevano piu' che utili!
L'unica cosa che mi mancava era il controllo da fare...
anche a te viene un programma articolato come la soup? :-)

__________________
:approved:

01-03-2004 13:19
Click Here to See the Profile for mafalda Click here to Send mafalda a Private Message Find more posts by mafalda Add mafalda to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 12:04.    Post New Thread    Post A Reply
Pages (2): « 1 [2]   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.095 seconds (55.59% PHP - 44.41% MySQL) con 24 query.