The c++ server already have a native c++ client, now we need to add a Silverlight client without any modification to the server. The applications are biased to use minimal data transfer. so we cannot use xml ( which will also create changes in server ) Recreating the data byte-by-byte is possible at client, but we would like to know of other possible methods.
JS 2008
Posts
-
C++ structure decoding in silverlight -
C++ structure decoding in silverlightI want to develop tcp socket application,forwhich want to use c++ tcp server and silverlight tcp client(web client).At server filling data in a structure and sending to the client,Is there any way to retain the values of the structure at client side?Or can i serialize the sending data as a class object in silverlight?
-
GUI updations on socket callbackMy scenario is like this. SocketReceiveCallback(object sender, SocketAsyncEventArgs e ) { // read data from e.Buffer. if ( dataReceived == TotalDataSize ) // checks of the complete reception of one image { // update the GUI using the received data. System.Diagnostics.Debug.WriteLine( “ received image “ ); Dispatcher.BeginInvoke(new DisplayImageDelgate(DislayImageData), imageData); // imageData is a class containing the received data } Else { // call socket.receiveAsync() to get next set of data. } } private void DisplayImageData (MyImageData data) { if (data.ImageStream != null) { BitmapImage bmp = new BitmapImage(); bmp.SetSource(new MemoryStream(data.ImageStream)); myReceivedImageCtrl.Source = bmp; //GUI update should happen at this point. System.Diagnostics.Debug.WriteLine( “ Draw image “ ); } } Please note that my application, there is continues async requests to server ( corresponding to user action ) and server responds with a stream of image data( eg:- 100 images. The application needs to update the GUI immediately after each image is received ( even while the server streams the data). In the above case although the SocketReceiveCallback is getting the data continuously from server, the GUI update happens only after all the data receive is completed( which can take a long time ). It seems that although the DisplayImage function is invoked using BeginInvoke, the system actually executes the display function at a later stage, causing ‘jumping’ image displays The debug trace obtained was:- received image received image received image received image Draw image Draw image Draw image Instead of the needed received image Draw image received image Draw image received image Draw image What could be done? Thanks and Regards JS
-
GUI updations on socket callbackI have a silverlight application,that communicating and getting data through socket communication.At each Receive callback i want to get data and update in the GUI at the moment itself.In this case sending and receiving data asynchronously,but the delegate for GUI updation in action only after all receive callbacks.How can i execute GUI updations sequentially with each callback?
-
Silverlight + WCF CommunicationThanks for the answer,But I already used [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple],but the problem still exists,Also implemented the service as asynchronously,Could you suggest any other solutions?
-
The asp.net page is not get updatedI have an asp.net application which uses Silverlight control.The silverlight control is loading by using a button click as a seperate window.At the same time i want to update aspx page and silverlight control,so i used a thread for handling silverlight control button click.But as a result the aspx page is not get updated,if i start the thread for the silverlight control
-
Multiple client access in a wcf serviceI have a silverlight application which uses wcf service hosted in a wpf application, but when I try to connect more then one client the second client always waits until the first client completes the call.How can I make WCF to accept calls from multiple clients at the same time?
-
Silverlight + WCF CommunicationI have a silverlight application which uses wcf service hosted in a wpf application, but when I try to connect more then one client the second client always waits until the first client completes the call.How can I make WCF to accept calls from multiple clients at the same time?
-
Video Conferencing Application in wpfNeed a sample video Conferencing application using wpf
-
Chat application in wpf using TCp/IPListen PartSocket newsock = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); IPEndPoint iep = new IPEndPoint( IPAddress.Any, 2091 ); newsock.Bind( iep ); newsock.Listen( 5 ); newsock.BeginAccept( new AsyncCallback( AcceptConn ), newsock ); void AcceptConn( IAsyncResult iar ) { Socket oldserver = ( Socket )iar.AsyncState; client = oldserver.EndAccept( iar ); Thread receiver = new Thread( new ThreadStart( ReceiveData ) ); receiver.Start(); } void ReceiveData() { int recv; string stringData; while( true ) { recv = client.Receive( data ); stringData = Encoding.ASCII.GetString( data, 0, recv ); if( stringData == "bye" ) break; } stringData = "bye"; byte[] message = Encoding.ASCII.GetBytes( stringData ); client.Send( message ); client.Close(); return; } Connection client = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); IPEndPoint iep = new IPEndPoint( IPAddress.Parse( "127.10.27.61" ), 2091 ); client.BeginConnect( iep, new AsyncCallback( Connected ), client ); void Connected( IAsyncResult iar ) { client.EndConnect( iar ); Thread receiver = new Thread( new ThreadStart( ReceiveData ) ); receiver.Start(); } My code is like thisduring the connection part error happends,May be due to 2 threads,how can i solve the same
-
Chat application in wpf using TCp/IPNeed a chat application in wpf using TCP/IP service,not using wcf
-
How to get the listboxitem when listbox do data binding in WPF?I wish to disable particcular listbox items from a listbox binding with a list,How can i get the ListBoxitem?
-
FolderBrowser Dialog WPFIt supports only for Windows Vista,Want a Custom control for any OS
-
FolderBrowser Dialog WPFIs there any source code for customized Folderbrowser Dialog for WPF?
-
Is there any native WPF Multiselect combobox available ?<Style x:Key="MultiSelectComboBox" TargetType="{x:Type ComboBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBox}"> <Grid SnapsToDevicePixels="true" x:Name="MainGrid" Height="Auto" Width="Auto"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="0"/> </Grid.ColumnDefinitions> <Popup AllowsTransparency="true" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Margin="1" x:Name="PART_Popup" Grid.ColumnSpan="2"> <Border x:Name="DropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding Path=ActualWidth, ElementName=MainGrid}"> <ScrollViewer CanContentScroll="true"> <ListBox x:Name="lstBox" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained" SelectionMode="Multiple" ItemsSource="{TemplateBinding ItemsSource}"/> </ScrollViewer> </Border> </Popup> <ToggleButton Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource ToggleButtonStyle1}"/> <ItemsControl IsHitTestVisible="false" ItemsSource="{Binding Path=SelectedItems, ElementName=lstBox}" Margin="4,0,0,0"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel IsItemsHost="True" Orientation="Horizontal"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ToggleButtonStyle1" TargetType="{x:Type ToggleButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ToggleButton}"> <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="A
-
ScrollViewer Size ProblemPlease post your xaml code for more clarifications
-
Map Maker(Earth surface rendering)Is there any idea/code to make map maker(earth surface rendering with lights and clouds) using wpf?
-
Volume rendering in web applicationsI want to render the volume data of images by using CT or MRI images in web applications
-
Volume rendering in web applicationsHow to do volume rendering of images in web applications?Suggest some samples
-
Volume rendering of imagesIs there any method to implement volume rendering of images in web application?I sthere any possiblity to do with VRML/X3D?