CN106383696A - Instant communication software designing and realization method based on WCF - Google Patents
Instant communication software designing and realization method based on WCF Download PDFInfo
- Publication number
- CN106383696A CN106383696A CN201510441765.3A CN201510441765A CN106383696A CN 106383696 A CN106383696 A CN 106383696A CN 201510441765 A CN201510441765 A CN 201510441765A CN 106383696 A CN106383696 A CN 106383696A
- Authority
- CN
- China
- Prior art keywords
- wcf
- design
- service
- client
- instant communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention provides an instant communication software designing and realization method based on WCF. The software is mainly used to primarily achieve instant communication inside local area network based on WCF and service-oriented. The software designing comprises steps of designing of universal module Common.dll, defining and realizing service protocol IChat, and defining client call-back joint IChatCallback.
Description
Technical field
The present invention relates to software design arts and in particular to a kind of MSN based on WCF design with realize method.
Background technology
Since proposing .NET strategy in Microsoft, just it has been proposed a series of products and technology for the Distributed Application priority setting up enterprise-level, including:ASP.NET
Web service .NET Remoting, Message
Queuing and Enterprise
Service etc..These technology are to be provided great convenience based on the research and development of software staff development Distributed Application of micro soft technique, and some shortcomings are also individually present simultaneously.
Content of the invention
In order to make up the deficiency of above technology, the invention provides a kind of method with realizing for the design of MSN based on WCF.The main function of this software is tentatively to realize based on the real-time Communication for Power in the LAN of WCF, with service-oriented as guiding theory.The design of software includes the design of general module Common.dll, the definition of contract of service IChat and realization, three parts of definition of the callback interface IChatCallback of client.End points(Endpoints)It is the key element that WCF realizes communication, client and service end are all by end points come exchange message, WCF
Us are allowed to be that multiple bindings and end points are added in service.End points is by address(Address), binding(Binding)And contract(Contract)Three part compositions, call data to transmit by message exchange come Method Of Accomplishment between client and service, and
3 kinds of message exchange patterns defined in WCF.Software development process is divided into:The design of instant messaging service with realize, host design with realize and instant communication client design with realize three parts so that application program has preferable safety, concurrency, extensibility and maintainability.This software on stream, takes full advantage of WCF basic framework and is developing service-oriented Distributed Application.Provide a kind of programmed method and Programming Methodology developing distributed software system based on WCF.
?
3 kinds of message exchange patterns defined in WCF.
OneWay:The message that this message exchange pattern can return without waiting service end after call method immediately returns.
Request/Reply:This message exchange pattern belongs to synchronization call.Need to wait the message of service end to return after calling method of servicing.
Duplex:This message exchange pattern has the function of client and service end two-way communication, and its realization simultaneously can also make message exchange have the effect of asynchronism callback.
Shell frame products of new generation under the .NET platform that WCF is released based on SOA as Microsoft are integrated with the advantage of prior art, represent the developing direction of Future Software architecture design and exploitation.Therefore, grasp and can in following application reasonable utilization WCF technology, it is very necessary for being based particularly on for the programmer that micro soft technique is developed for programmer.
After setting up host end end points, equally also it is necessary for the end points that distributed application program defines client, and only when the end points of client is mutually matched with certain end points at host end, the request of client could be listened to by host end.If service provides issue metadata, then utilize .NET
The SvcUtil.exe instrument that Framework 3.0 SDK is provided can easily automatically generate Client Agent corresponding with host end and client configuration file very much.
The design of service
Design includes the design of general module Common.dll, the definition of contract of service IChat and realization, three parts of definition of the callback interface IChatCallback of client.General module Common.dll mainly includes the definition to chat person's type Person, and it includes name(The title of chat person or code name)And ImageURL(The store path of the head portrait picture that chat person selects)Two privately owned fields and corresponding attribute access device.Due to Person
Type is user-defined dada type it is therefore necessary to add DataContractAttribute
Come explicit definition it.
Main inclusion tetra- basic skills of Join, Say, Whisper and Leave in the definition of contract of service IChat.Wherein Join represents:Enter chat;Say represents to all user's broadcasts;Whisper
Represent and message is sent to specified user;Leave represents and leaves chat.ServiceContract attribute need to be added by IChat interface flag is contract of service, due to the function of client to be realized and service end two-way communication, therefore must also arrange CallbackContract parameter, and its parameter IChatCallback is Duplex
Client readjustment type under pattern.The definition of the callback interface IChatCallback of client includes tetra- basic skills of UserEnter, Receive, ReceiveWhisper and UserLeave corresponding to Join, Say, Whisper and Leave respectively.UserEnter represents that all chat user receive a corresponding notice when there being new chat user to add;Receive represents the message of receive user broadcast;ReceiveWhisper represents the message that reception associated user sends;UserLeave represents that all chat user receive a corresponding notice when there being chat user to leave.The design of client
The main inclusion of design of client is realized Client Agent and is realized this three part with configuration file, the realization of callback interface contract of client and client login, Main form, the design of chat window interfaces and code logic.In client configuration file, address, binding, contract are corresponded with the configuration of host end respectively.
The object that main interface mainly uses the Proxy_Singleton type of singleton pattern establishment completes to exit, receive broadcast, the process receiving message and the function of showing chat forms for new user addition, user.
The method that the present invention provides, also certain deficiency, constantly change in needing to put into practice afterwards.
Claims (3)
1. the method with realizing for the design of a kind of MSN based on WCF, is characterized in that a kind of programmed method and Programming Methodology developing distributed software system based on WCF.
2. a kind of method with realizing for the design of MSN based on WCF, is characterized in that the main function of the system is tentatively to realize based on the real-time Communication for Power in the LAN of WCF, with service-oriented as guiding theory.
3. the method with realizing for the design of a kind of MSN based on WCF, is characterized in that the exploitation of system includes the design of general module Common.dll, the definition of contract of service IChat and realization, three parts of definition of the callback interface IChatCallback of client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510441765.3A CN106383696A (en) | 2015-07-26 | 2015-07-26 | Instant communication software designing and realization method based on WCF |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510441765.3A CN106383696A (en) | 2015-07-26 | 2015-07-26 | Instant communication software designing and realization method based on WCF |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106383696A true CN106383696A (en) | 2017-02-08 |
Family
ID=57915760
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510441765.3A Pending CN106383696A (en) | 2015-07-26 | 2015-07-26 | Instant communication software designing and realization method based on WCF |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106383696A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112333088A (en) * | 2021-01-04 | 2021-02-05 | 满金坝(深圳)科技有限公司 | Compatible instant messaging transmission method |
-
2015
- 2015-07-26 CN CN201510441765.3A patent/CN106383696A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112333088A (en) * | 2021-01-04 | 2021-02-05 | 满金坝(深圳)科技有限公司 | Compatible instant messaging transmission method |
CN112333088B (en) * | 2021-01-04 | 2021-04-20 | 满金坝(深圳)科技有限公司 | Compatible instant messaging transmission method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2019102064A (en) | Method and apparatus for processing task in smart device | |
CN102469064B (en) | Realization Method of Communication and communication equipment | |
WO2019104713A1 (en) | Machine learning method, master node, work node, and system | |
CN106445705A (en) | Platform cascading method and system based on Rabbit MQ and Socket.io | |
CN108270732A (en) | A kind of Streaming Media processing method and system | |
CN111083519A (en) | VR content distribution system and method based on cloud and edge computing | |
CN102662681A (en) | Distributed simulation general supporting platform based on high level architecture (HLA) and implementation method thereof | |
CN103139051A (en) | Instant messaging communication method based on Websocket protocol | |
CN101917394B (en) | Middleware system for sharing data in mobile phone equipment and working method | |
CN107231290A (en) | A kind of instant communicating method and system | |
CN101834765B (en) | System and method for remote file transfer | |
CN102629939A (en) | Electric power enterprise service bus realization method and device | |
TWI695650B (en) | Method and system for connecting electronic devices | |
CN103685535A (en) | Interface design of cloud database system for large-scale distributed heterogeneous data treatment | |
CN107071067B (en) | Cgo-based high-performance stock market access system and method | |
TWI338844B (en) | Processor task migration over a network in a multi-processor system | |
CN101089852A (en) | Method for support multi-language operation system | |
CN102893296A (en) | Selectively controlling information flow in collaborative environment | |
WO2012000221A1 (en) | Method for realizing netmeeting based on p2p technique on web page | |
CN106383696A (en) | Instant communication software designing and realization method based on WCF | |
CN102045274B (en) | Method and communication system for realizing information interaction based on instant messaging | |
WO2012159535A1 (en) | Instant messaging system and method for sharing user information | |
WO2012159537A1 (en) | Instant messaging system and method for sharing user information | |
CN106384274B (en) | A kind of data synchronizing processing method and system of domain name auction | |
CN201854301U (en) | Middleware system for sharing data on mobile phones |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170208 |
|
WD01 | Invention patent application deemed withdrawn after publication |