Author Topic: Client/Server sample  (Read 2091 times)

Offline TakisGen

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Client/Server sample
« on: October 29, 2006, 12:12:35 AM »
Hi Mike,

On the Server side, how do you obdain the Address of the Client connected?

Regards
Takis

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Client/Server sample
« Reply #1 on: October 29, 2006, 05:57:40 AM »
For present moment this feature disabled. But if you really need it I can add this feature very quickly.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline TakisGen

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Client/Server sample
« Reply #2 on: November 07, 2006, 05:34:33 PM »
Hi Mike,

Please note, that Unicode characters are not passed correctly between Server and Client.
The same happens in SMSClient.

Regards
Takis

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Client/Server sample
« Reply #3 on: November 07, 2006, 11:24:40 PM »
How you send it?
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline TakisGen

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Client/Server sample
« Reply #4 on: November 08, 2006, 03:09:51 AM »
     ...
    Tx(ReasonEnum.Chat, TextBox.Text)
     ...

    Private Sub Tx(ByVal Reason As ReasonEnum, ByVal TxData As String)
        Try
            Select Case RunAs
                Case RunAsEnum.Server : Server.Write(Data)
                Case RunAsEnum.Client : Client.Write(Data)
            End Select
        Catch ex As Exception
            Log(ex.Message, ColorInfo)
        End Try
    End Sub

    Private Sub Server_OnData(ByVal sender As Object, ByVal e As AxBluetoothFrameworkX.IBFServerXEvents_OnDataEvent) Handles Server.OnData
        Rx(e.data)
    End Sub

    Private Sub Client_OnData(ByVal sender As Object, ByVal e As System.EventArgs) Handles Client.OnData
        Dim Data As String
        Dim Size As Integer = 1024
        Client.Read(Data, Size)
        Rx(Data)
    End Sub

    Private Sub Rx(ByVal RxData As String)
    ...
    End Sub

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Client/Server sample
« Reply #5 on: November 08, 2006, 07:46:14 PM »
All correct. But internally it transleted into non-Unicode strings. So the best way is send it byte-by-byte.
I will add full Unicode support in next (4.5) version which will published at this week.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager