1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
8<title>DWCMatchedSCCallback</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__match_8h_169fa2126df86bf98f54258f5ccab9beb"></a>
14<h1 align="left">DWCMatchedSCCallback</h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;dwc.h&gt;</CODE><BR>
20  <BR>
21  <PRE><CODE>typedef void(*) <a href=DWCMatchedSCCallback.html#dwc__match_8h_169fa2126df86bf98f54258f5ccab9beb>DWCMatchedSCCallback</a>(<a href=Macro.html#dwc__error_8h_1c049360b665a730f7f639f014a4fed19>DWCError</a> error,
22             BOOL cancel,
23             BOOL self,
24             BOOL isServer,
25             int index,
26             void *param);</CODE></PRE></dd>
27</dl>
28
29<h2>Arguments</h2>
30
31<TABLE border="1" width="100%">
32  <TBODY>
33
34    <TR>
35<TD width="13%"><EM><STRONG><parametername>error</parametername></STRONG></EM></TD>
36<TD width="87%">DWC error type.</TD>
37    </TR>
38
39    <TR>
40<TD width="13%"><EM><STRONG><parametername>cancel</parametername></STRONG></EM></TD>
41<TD width="87%">TRUE: Matchmaking was canceled. <BR>FALSE: Matchmaking was not canceled.</TD>
42    </TR>
43
44    <TR>
45<TD width="13%"><EM><STRONG><parametername>self</parametername></STRONG></EM></TD>
46<TD width="87%">TRUE: This host successfully connected to the game server, or canceled the connection.<BR>FALSE: Another host succeeded in connecting to the game server, or canceled that connection.</TD>
47    </TR>
48
49    <TR>
50<TD width="13%"><EM><STRONG><parametername>isServer</parametername></STRONG></EM></TD>
51<TD width="87%">TRUE: When <CODE>self=FALSE</CODE>, the above operations have been completed and this host is the game server. <BR>FALSE: Either (when <CODE>self=FALSE</CODE>) the above operations have completed and this host is a client, or <CODE>self=TRUE</CODE>.</TD>
52    </TR>
53
54    <TR>
55<TD width="13%"><EM><STRONG><parametername>index</parametername></STRONG></EM></TD>
56<TD width="87%">When <CODE>self=FALSE</CODE>, the above operations have been completed, and this argument holds this host's friend roster index. &ndash;1 if the host is not a friend or if <CODE>self=TRUE</CODE>.</TD>
57    </TR>
58
59    <TR>
60<TD width="13%"><EM><STRONG><parametername>param</parametername></STRONG></EM></TD>
61<TD width="87%">Callback parameter.</TD>
62    </TR>
63
64  </TBODY>
65</TABLE>
66
67<h2>Return Values</h2>
68
69<p>None.</p>
70
71<H2>Description</H2>
72<p>This function is called when a single connection has been established or when an error or cancellation has occurred after calling the <a href=DWC_ConnectToAnybodyAsync.html#dwc__main_8h_10c4e2a60e98dfa82a16b5e896d3a2203><CODE>DWC_ConnectToAnybodyAsync</CODE></a>, <a href=DWC_ConnectToFriendsAsync.html#dwc__main_8h_1dcb8be27412df5c9d5e0d9b9d035079b><CODE>DWC_ConnectToFriendsAsync</CODE></a>, <a href=DWC_SetupGameServer.html#dwc__main_8h_1230f0bb02b234d806cc51470e67647f1><CODE>DWC_SetupGameServer</CODE></a>, <a href=DWC_ConnectToGameServerAsync.html#dwc__main_8h_1254f419a2e97ad73074d232c4160cfd2><CODE>DWC_ConnectToGameServerAsync</CODE></a>, or <a href=DWC_ConnectToGameServerByGroupID.html#dwc__main_8h_116b3b3faa8c7b9ee600fa77820ee1f57><CODE>DWC_ConnectToGameServerByGroupID</CODE></a> function.</p><p>If an error occurs, the values of all arguments other than <CODE>error</CODE> and <CODE>param</CODE> are undefined.</p><p>This callback function can be configured with the <a href=DWC_ConnectToAnybodyAsync.html#dwc__main_8h_10c4e2a60e98dfa82a16b5e896d3a2203><CODE>DWC_ConnectToAnybodyAsync</CODE></a>, <a href=DWC_ConnectToFriendsAsync.html#dwc__main_8h_1dcb8be27412df5c9d5e0d9b9d035079b><CODE>DWC_ConnectToFriendsAsync</CODE></a>, <a href=DWC_SetupGameServer.html#dwc__main_8h_1230f0bb02b234d806cc51470e67647f1><CODE>DWC_SetupGameServer</CODE></a>, <a href=DWC_ConnectToGameServerAsync.html#dwc__main_8h_1254f419a2e97ad73074d232c4160cfd2><CODE>DWC_ConnectToGameServerAsync</CODE></a>, or <a href=DWC_ConnectToGameServerByGroupID.html#dwc__main_8h_116b3b3faa8c7b9ee600fa77820ee1f57><CODE>DWC_ConnectToGameServerByGroupID</CODE></a> functions.</p><p><h3>Possible combinations of argument values</h3></p><p>For <CODE>error==<a href=Macro.html#dwc__error_8h_1c049360b665a730f7f639f014a4fed19e183029cab4bcfb2768bf5e52c81ce0a>DWC_ERROR_NONE</a>&amp;&amp;cancel==FALSE</CODE>:<table border="1"><tr><td><br><STRONG><CODE>self</CODE></STRONG><br></td><td><br><STRONG><CODE>isServer</CODE></STRONG><br></td><td><br><STRONG>Content</STRONG><br></td></tr><tr><td><br>TRUE<br></td><td><br>TRUE<br></td><td><br>None.<br></td></tr><tr><td><br>TRUE<br></td><td><br>FALSE<br></td><td><br>You (this host) are a client, and you have successfully connected to the server and its network. <CODE>index</CODE> is -1.<br></td></tr><tr><td><br>FALSE<br></td><td><br>TRUE<br></td><td><br>None.<br></td></tr><tr><td><br>FALSE<br></td><td><br>FALSE<br></td><td><br>You are the server or a client, and another client successfully connected to the server and its network.<br><CODE>index</CODE> is the friend roster index of that client. If that client is not your friend, <CODE>index</CODE> is -1.<br></td></tr></table></p><p><br>For <CODE>error==<a href=Macro.html#dwc__error_8h_1c049360b665a730f7f639f014a4fed19e183029cab4bcfb2768bf5e52c81ce0a>DWC_ERROR_NONE</a>&amp;&amp;cancel==TRUE</CODE>:<table border="1"><tr><td><br><STRONG><CODE>self</CODE></STRONG><br></td><td><br><STRONG><CODE>isServer</CODE></STRONG><br></td><td><br><STRONG>Content</STRONG><br></td></tr><tr><td><br>TRUE<br></td><td><br>TRUE<br></td><td><br>You (this host) are the server, and you have canceled matchmaking. <CODE>index</CODE> is -1.<br></td></tr><tr><td><br>TRUE<br></td><td><br>FALSE<br></td><td><br>You are a client, and you have canceled matchmaking. <CODE>index</CODE> is -1.<br></td></tr><tr><td><br>FALSE<br></td><td><br>TRUE<br></td><td><br>You are a client, and the server has canceled matchmaking. <CODE>index</CODE> is the friend roster index of the server.<br></td></tr><tr><td><br>FALSE<br></td><td><br>FALSE<br></td><td><br>You are the server or a client, and another client has canceled matchmaking.<br><CODE>index</CODE> is the friend roster index of that client. If that client is not your friend, <CODE>index</CODE> is -1.<br></td></tr></table></p>
73
74<h2>See Also</h2>
75<p>
76
77<CODE><A href="DWC_ConnectToAnybodyAsync.html">DWC_ConnectToAnybodyAsync<BR></A></CODE>
78
79<CODE><A href="DWC_ConnectToFriendsAsync.html">DWC_ConnectToFriendsAsync<BR></A></CODE>
80
81<CODE><A href="DWC_SetupGameServer.html">DWC_SetupGameServer<BR></A></CODE>
82
83<CODE><A href="DWC_ConnectToGameServerAsync.html">DWC_ConnectToGameServerAsync</A></CODE>
84
85<CODE><A href="DWC_ConnectToGameServerByGroupID.html">DWC_ConnectToGameServerByGroupID<BR></A></CODE>
86
87</p>
88
89<H2>Revision History</H2>
90<DL>
91
92<DT><para>2.0.0</DT>
93<DD>Made revisions in line with changes to the specifications used by all matchmaking types.</DD>
94
95<DT><para>1.1.0</DT>
96<DD>Fixed broken table.</DD>
97
98</DL>
99<hr><p>CONFIDENTIAL</p></body>
100</html>
101