Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > German Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Verbindung bei TCPIP

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2012, 09:15 PM
Junior Member
 
Join Date: Apr 2011
Posts: 10
Default Verbindung bei TCPIP

Hallo,

Ich habe zwischen 2 Geräten eine TCPIP Verbindung aufgebaut. Geht soweit gut, aber wie kann ich auf der Serverseite erkennen, ob eine Verbindung mit einem Client noch besteht, wenn ich beim Client CL_SocketC1.Close verwende?
Beim Client geht das mit CL_SocketC1.Connected, beim Server scheinbar nicht.

Thomas

Sorry, sollte ins Forum, kann das jemand verschieben ! Danke

Last edited by thoro : 01-14-2012 at 09:22 PM.
Reply With Quote
  #2 (permalink)  
Old 01-15-2012, 10:22 AM
Knows the basics
 
Join Date: Nov 2011
Location: Im Paradies
Posts: 83
Default

Du kannst einen Timer bauen und wenn ein definiertes Timeout erreicht ist, Verbindung schliessen. Wenn also zB 5min nix mehr vom Client kommt, dann ServerSocket.close

Wenn du mit Streams arbeitest:
http://www.basic4ppc.com/forum/addit...g-streams.html
Reply With Quote
  #3 (permalink)  
Old 01-15-2012, 01:03 PM
Junior Member
 
Join Date: Apr 2011
Posts: 10
Default

mit dem Timer, das ist nicht so gut, der Client hat die Verbindung ja vielleicht doch nicht beendet und will dann später noch mal was schicken.
Die TCP IP Verbindung hat doch aber eindeutige Stati, un wenn ein Client die Verbindung abbaut, bekommt das doch normalerweise ein Server mit.
Ich arbeite mit Streams, aber das Terminated Event kommt nur, wenn ich die Clientappl. nachlade, dann wird die Verbindung scheinbar echt gekappt.
Kann es sein, dass das Sock.Close die Verbindung nicht wirklich beendet ???
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
TCP Verbindung zu einem AVR-Net IO captwo German Forum 0 10-10-2011 02:31 PM
FTP verbindung zu Server? Andrej.Malysev German Forum 1 03-07-2009 01:00 PM
connectio tcpIP telnet protocol mircome Questions (Windows Mobile) 2 06-22-2008 11:16 AM


All times are GMT. The time now is 06:43 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0