2010-08-10 9 views
0

Arraylist를 다른 모든 클라이언트에게 브로드 캐스트하기 위해 내 서버로 보내려고하지만 직렬화 한 후 잘 모르겠습니다. 전송 방법은 어떻게됩니까? 이것은 내가 여기있는 것입니다 :클라이언트에서 서버로 객체 직렬화 보내기

Private Sub Button1_Click(ByVal sender As System.Object, _ 
     ByVal e As System.EventArgs) Handles Button1.Click 

     Dim BinFormatter As New Binary.BinaryFormatter() 
     Dim FS As New System.IO.FileStream("c:\test.txt", IO.FileMode.Create) 

     Dim i As Integer 
     Dim f As Integer 
     Dim listchkBox As New ArrayList() 
     For Each ctrl As Control In Me.Controls 
      Dim chkbox As CheckBox 
      If TypeOf ctrl Is CheckBox Then 
       i += 1 
       chkbox = ctrl 
       If chkbox.Checked = True Then 
        listchkBox.Add(i) 
       End If 
      End If 
     Next 
     For f = 0 To listchkBox.Count - 1 
      MsgBox(listchkBox.Item(f)) 
     Next 

     BinFormatter.Serialize(FS, listchkBox) 

     ' I am not sure if I am doing right after this 
     ' line I am not sure how to pack it into a stream and 
     ' send across, please advice... 

End Sub 

고마워요!

답변

0

Remoting 또는 WCF를 확인해야합니다.

.NET Remoting HelloWorld

:

에 유래에 대한 빠른 검색을 사용하는 방법에 대한 아주 기본적인 아이디어를 제공해야하는이, 준

관련 문제